From bc3ab8a0003b7f54e0149ee3c9a07cd9836dcab2 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sun, 14 Jan 2024 09:26:58 -0500 Subject: [PATCH] fix(ui): allow hash handler to accept tab ids (#2019) --- src_assets/common/assets/web/config.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src_assets/common/assets/web/config.html b/src_assets/common/assets/web/config.html index 54ca2ed9..18dba261 100644 --- a/src_assets/common/assets/web/config.html +++ b/src_assets/common/assets/web/config.html @@ -1387,9 +1387,10 @@ this.tabs.forEach(tab => { Object.keys(tab.options).forEach(key => { - if (key === stripped_hash) { + if (tab.id === stripped_hash || key === stripped_hash) { this.currentTab = tab.id; - + } + if (key === stripped_hash) { // sleep for 2 seconds to allow the page to load setTimeout(() => { let element = document.getElementById(stripped_hash); @@ -1398,8 +1399,13 @@ } }, 2000); } + + if (this.currentTab === tab.id) { + // stop looping + return true; + } }); - }) + }); } };