js: adjust URL to mention selected tab (#68135)
This commit is contained in:
parent
7ca220b9bf
commit
40114f3665
|
@ -341,6 +341,11 @@ var gadjo_js = gadjo_js || {};
|
|||
.querySelector('#' + btn.getAttribute('aria-controls'))
|
||||
.hidden = false;
|
||||
|
||||
// Adjust URL to mention selected tab
|
||||
const url = new URL(document.location);
|
||||
url.hash = '#open:' + btn.getAttribute('aria-controls').substring(6);
|
||||
history.replaceState(null, '', url);
|
||||
|
||||
// Trigger gadjo:tab-selected event on panel
|
||||
$(this.parent.querySelector('#' + btn.getAttribute('aria-controls'))).trigger('gadjo:tab-selected');
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue