gallery.js v2: when the last 'next' turns off, focus moves to the close button instead of the page behind (seen in the live check)
gates / gates (push) Successful in 4m29s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012qRErfCoiTkvDK9N5XHbzb
This commit is contained in:
2026-10-08 13:18:40 +02:00
parent 79c53b5f1a
commit 42519a776a
9 changed files with 10 additions and 8 deletions
+2
View File
@@ -79,6 +79,8 @@
nextBtn.style.display = single ? 'none' : 'flex';
dots.style.display = single ? 'none' : 'flex';
counter.style.display = single ? 'none' : 'block';
// a button that just turned off would drop the focus to the page behind the viewer
if (document.activeElement && document.activeElement.disabled) closeBtn.focus();
}
function go(i) {