Close lightboxes/overlays on tab switch
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6320a82852
commit
6aad2e073c
1 changed files with 2 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue