fix: stop app feedback dialog clicks from focusing the iframe beneath

Clicking inside the feedback overlay (e.g. the textarea) reached
initgui's global mousedown -> focusWindow path: mouseover_window is
computed geometrically and is blind to the overlay, so focusWindow
focused the app window's iframe underneath — stealing keyboard focus
from the textarea and forwarding the click into the app.

Suppress it the established way (same fix as the dashboard app-group
panel): set window.mouseover_window = undefined in the overlay's own
mousedown handler, which runs before the document-level one; undefined
is the only value initgui's guard skips.
This commit is contained in:
Nariman Jelveh
2026-08-12 15:00:32 -07:00
parent 556380cf16
commit 81f9f00fc0
+8
View File
@@ -149,6 +149,14 @@ async function UIWindowAppFeedback (options) {
if ( e.key === 'Escape' && ! sending ) close();
});
$overlay.on('mousedown', (e) => {
// A press anywhere in the overlay must not reach initgui's global
// mousedown -> focusWindow path: mouseover_window is computed
// geometrically (blind to this overlay), so focusWindow would
// focus the app window's iframe underneath — stealing keyboard
// focus from the textarea and forwarding the click into the app.
// This handler runs before the document-level one, and undefined
// is the only value its guard skips.
window.mouseover_window = undefined;
if ( e.target === $overlay.get(0) && ! sending ) close();
});
// Same in-flight gate as Escape/backdrop: closing while the POST is