fix(editor): guard the second Esc path against the busy overlay too
There are two Escape handlers: a capture-phase one for the editor and the global one-surface-per-keystroke chain. Only the first was guarded, so export - which reaches the editor through the global chain - still popped the discard-confirm under the overlay.
This commit is contained in:
@@ -8139,6 +8139,12 @@ async function init() {
|
||||
e.preventDefault();
|
||||
openCheatsheet();
|
||||
} else if (e.key === 'Escape') {
|
||||
// A blocking operation owns the screen (export, sync, rotation):
|
||||
// the busy overlay is above every surface listed below, so nothing
|
||||
// here is actually reachable — and the editor's discard-confirm
|
||||
// would open invisible underneath it. Second Esc path; the
|
||||
// capture-phase one for the editor carries the same guard.
|
||||
if (isBusy()) return;
|
||||
// Close in priority order: confirm first (most modal-y), then the
|
||||
// palette — it OPENS OVER the info modals (Ctrl+K on top of the
|
||||
// cheatsheet), so it must close before them. ONE surface per
|
||||
|
||||
Reference in New Issue
Block a user