fix(ui): allow hash handler to accept tab ids (#2019)
This commit is contained in:
parent
ec1ae4a3fe
commit
bc3ab8a000
1 changed files with 9 additions and 3 deletions
|
|
@ -1387,9 +1387,10 @@
|
||||||
|
|
||||||
this.tabs.forEach(tab => {
|
this.tabs.forEach(tab => {
|
||||||
Object.keys(tab.options).forEach(key => {
|
Object.keys(tab.options).forEach(key => {
|
||||||
if (key === stripped_hash) {
|
if (tab.id === stripped_hash || key === stripped_hash) {
|
||||||
this.currentTab = tab.id;
|
this.currentTab = tab.id;
|
||||||
|
}
|
||||||
|
if (key === stripped_hash) {
|
||||||
// sleep for 2 seconds to allow the page to load
|
// sleep for 2 seconds to allow the page to load
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
let element = document.getElementById(stripped_hash);
|
let element = document.getElementById(stripped_hash);
|
||||||
|
|
@ -1398,8 +1399,13 @@
|
||||||
}
|
}
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.currentTab === tab.id) {
|
||||||
|
// stop looping
|
||||||
|
return true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue