commit 3fc0537bef1fe07deb01b5850ee4a90ca537b898
Author: jens <jens.se@icloud.com>
AuthorDate: Mon Apr 20 20:11:43 2026 +0200
Commit: jens <jens.se@icloud.com>
CommitDate: Mon Apr 20 20:11:43 2026 +0200
update 1
---
index.html | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/index.html b/index.html
index 1b75543..7f732c8 100644
--- a/index.html
+++ b/index.html
@@ -1341,6 +1341,15 @@ function doImgConvert() {
if (!editMode) toggleEdit();
}
+// ── Tab bar delegation ────────────────────────────────────────────────────────
+document.getElementById('tabbar').addEventListener('click', e => {
+ const closeBtn = e.target.closest('[data-close-idx]');
+ if (closeBtn) { e.stopPropagation(); closeTab(parseInt(closeBtn.dataset.closeIdx)); return; }
+ if (e.target.closest('[data-tab-add]')) { addTab(); return; }
+ const tabBtn = e.target.closest('[data-tab-idx]');
+ if (tabBtn) switchTab(parseInt(tabBtn.dataset.tabIdx));
+});
+
// ── Drop / file events ────────────────────────────────────────────────────────
const dz = document.getElementById('dropzone');
dz.addEventListener('dragover', e=>{e.preventDefault();dz.classList.add('over')});