From 6aad2e073c914afe58f240f714c3fac1479bef85 Mon Sep 17 00:00:00 2001 From: Scott Reimers Date: Sun, 22 Mar 2026 23:30:14 -0400 Subject: [PATCH] Close lightboxes/overlays on tab switch Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/app.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/app.js b/frontend/app.js index 77d4b9e..9937253 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -2818,6 +2818,8 @@ circleNameInput.addEventListener('keydown', (e) => { document.querySelectorAll('.tab').forEach(tab => { tab.addEventListener('click', () => { if (tab.dataset.tab === currentTab) return; + // Close any open lightboxes/overlays/popovers + document.querySelectorAll('.image-lightbox, .download-prompt-overlay, .offline-lightbox, .overlay').forEach(el => el.remove()); document.querySelectorAll('.tab').forEach(t => t.classList.remove('active')); const oldView = document.querySelector('.view.active'); if (oldView) {