[Bug]: Theme import dialog close button ignores clicks over desktop titlebar #11573
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/desktop
Steps to reproduce#
- In the desktop app on macOS, open Settings → Appearance → Themes → Add theme.
- Select Dracula under Popular, or search for it, and wait for results.
- Use a window height where the expanded dialog places its close button over the desktop titlebar's drag region.
- Move the native pointer over the center of the X and click it. Compare with clicking the lower edge below the drag strip.
Expected behavior#
The close button shows its hover state and closes the dialog when clicked anywhere inside its hit target, including when the dialog overlaps the titlebar.
Actual behavior#
The center of the X does not respond to hover or close the dialog. In the reproduction recorded for PR #10978, two center clicks left the dialog open, while a click on its lower edge closed it.
The taller theme search dialog overlaps Electron's window-drag region, which intercepts native pointer events even though the dialog is visually above it. Shared dialog popups need to be excluded from window dragging.
Impact#
Minor bug or occasional failure
Version or commit#
Reproduction documented in PR #10978, against the code before fix commit 1bb4f1bc33fcc229fdae5920579b0e6898967d35 (parent e16b8b059). This report records that reproduction; it is not a new test of the latest release.
Environment#
macOS; isolated Electron 44.1.0 window rendering the real ThemeImportDialog and WorkspacePageHeader, using native pointer input. Exact macOS version was not recorded. Browser checks at 1280×900 and 1280×720 passed even before the fix, isolating the failure to desktop hit testing.
Logs or stack traces#
No stack trace; the failure is native pointer hit testing. See the recording below.
Screenshots, recordings, or supporting files#
Before: the pointer is over the X center, but its hover background does not appear.
Native interaction recording (11 seconds): center click ignored before the fix, lower-edge click succeeds, and center click succeeds after the fix. The isolated reproduction contains no user data.
https://github.com/user-attachments/assets/958a5e5e-6e1a-4ace-978e-5714b5780dfd
Workaround#
Click the lower edge of the close button that is below the titlebar drag strip.
Proposed fix#
PR #10978 adds -webkit-app-region: no-drag to the shared dialog popup styles, preserving native interaction when dialogs overlap the titlebar. The PR includes before/after evidence and validation.
Yeah i cannot close PRs so maintainers will have a look into that!
juliusmarminge closed this
Sign in to join this conversation.
@kridaydave I already got a PR open for this issue: https://github.com/pingdotgg/t3code/pull/10978 , feel free to close that if it's getting fixed somewhere else, or pull that into the branch where those changes are planned.