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) {