From 81f9f00fc02ebf0b3e06fc7a13e29e0e028a05a8 Mon Sep 17 00:00:00 2001 From: Nariman Jelveh Date: Wed, 12 Aug 2026 15:00:32 -0700 Subject: [PATCH] fix: stop app feedback dialog clicks from focusing the iframe beneath MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/gui/src/UI/UIWindowAppFeedback.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gui/src/UI/UIWindowAppFeedback.js b/src/gui/src/UI/UIWindowAppFeedback.js index f5cc3991a..dea78bdfd 100644 --- a/src/gui/src/UI/UIWindowAppFeedback.js +++ b/src/gui/src/UI/UIWindowAppFeedback.js @@ -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