From 4a0e75ae39f26f59f7e8f5f5796be7670f89aed9 Mon Sep 17 00:00:00 2001 From: DemonGatanjieu <207458273+DemonGatanjieu@users.noreply.github.com> Date: Tue, 13 Oct 2026 15:50:58 +0800 Subject: [PATCH] Esc closes a model's Outputs window, not the details under it The Outputs window (showGeneratedGallery) sits inside the browser with only an id, so the Esc rule did not see it as a layer: Esc pressed the details' back button and left the window open over the list. Esc now hides it, as its close button does. Co-Authored-By: Claude Opus 5.5 --- web/modules/ui_browser_navigation.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/modules/ui_browser_navigation.js b/web/modules/ui_browser_navigation.js index 94272fb..4c455bd 100644 --- a/web/modules/ui_browser_navigation.js +++ b/web/modules/ui_browser_navigation.js @@ -77,6 +77,12 @@ export function bindBrowserEscape(owner) { .some(el => el !== owner.modal && el.getClientRects().length && (el.getAttribute('role') === 'menu' || [...el.classList].some(c => c.startsWith('anomalous-') && c.endsWith('overlay')))); if (layered || document.querySelector('dialog[open], .p-dialog-mask')) return; + // A model's Outputs window lies over its details inside the browser: Esc closes it, as its ✖ does. + const outputs = document.getElementById('anomalous-generated-gallery-overlay'); + if (outputs?.getClientRects().length) { + outputs.style.display = 'none'; + return; + } const back = [...owner.modal.querySelectorAll(BACK_BUTTONS)].find(button => button.getClientRects().length); if (back) back.click(); else owner.close();