Fix navigation menu buttons changing tab

Affects:
- Note #1617
This commit is contained in:
Rsl1122 2020-10-20 16:32:52 +03:00
parent 8e1f79f537
commit f46418d1f9

View File

@ -52,8 +52,8 @@ for (let tab of tabs) {
window.addEventListener('hashchange', openPage); window.addEventListener('hashchange', openPage);
//Sidebar navigation tabs //Sidebar navigation tabs
$('#accordionSidebar .nav-item a').click(event => { $('#accordionSidebar .nav-button, #accordionSidebar .nav-button a').click(event => {
if(history.replaceState) { if (history.replaceState) {
event.preventDefault(); event.preventDefault();
history.replaceState(undefined, undefined, '#' + event.currentTarget.href.split('#')[1]); history.replaceState(undefined, undefined, '#' + event.currentTarget.href.split('#')[1]);
openPage(); openPage();