diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2025-07-31 18:58:07 -0400 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2025-07-31 18:58:07 -0400 |
| commit | 5b9f8aa061b7ee1a71ef0f3285e2ec2756a57899 (patch) | |
| tree | 7e1fdca692118e540a21e58ad06a70fb6ed08199 /docs/tabsync.js | |
| parent | 0a65384bec21c8748b8af87d3844112f5128d7f5 (diff) | |
fix a recursion bug in the tabsyncing
Diffstat (limited to 'docs/tabsync.js')
| -rw-r--r-- | docs/tabsync.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/tabsync.js b/docs/tabsync.js index 86e54b1c..935e42a2 100644 --- a/docs/tabsync.js +++ b/docs/tabsync.js @@ -4,6 +4,8 @@ document.addEventListener("DOMContentLoaded", function () { for (const tab of tabs) { tab.addEventListener("click", () => { + if (tab.dataset.syncing === "true") return; + const currentLabel = document.querySelector(`label[for="${tab.id}"]`); if (!currentLabel) return; @@ -19,7 +21,9 @@ document.addEventListener("DOMContentLoaded", function () { const inputId = label.getAttribute("for"); const input = document.getElementById(inputId); if (input && input !== tab) { + input.dataset.syncing = "true"; input.click(); + input.dataset.syncing = "false"; } } } |
