fix(settings): Esc doesn't close Settings while busy overlay is up

Pressing Esc during a sync/backup closed Settings under the busy overlay.
The Esc handler already bails for open modals — added the same bail when
#busyOverlay is visible.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-07-09 23:13:46 +01:00
parent 8206db5e44
commit f644f8cb57
+2
View File
@@ -8739,6 +8739,8 @@ async function init() {
if (e.key !== 'Escape') return; if (e.key !== 'Escape') return;
if (!$('#settingsPanel').classList.contains('is-open')) return; if (!$('#settingsPanel').classList.contains('is-open')) return;
if (document.querySelector('.modal:not(.is-hidden)')) return; if (document.querySelector('.modal:not(.is-hidden)')) return;
// Busy overlay up (sync/backup running) — don't close under it.
if ($('#busyOverlay') && !$('#busyOverlay').classList.contains('is-hidden')) return;
// When the search box has focus AND a query, the input's own // When the search box has focus AND a query, the input's own
// handler clears the query (and stops propagation) — let it run. // handler clears the query (and stops propagation) — let it run.
// Capture phase fires document handlers BEFORE element handlers, // Capture phase fires document handlers BEFORE element handlers,