fix(web): keep dialog controls clickable over desktop titlebars #10978
main fromrefs/pull/10978/head·opened View on GitHubFixes #11573
What Changed#
Mark shared dialog popups with -webkit-app-region: no-drag so their controls remain interactive when they overlap a desktop titlebar. This restores the theme import dialog's existing X hover state and center click, and covers the shared confirmation-dialog and command-palette popup styles.
Why#
Searching for a theme makes the modal taller and moves its close button into the desktop header's window-drag region. Electron intercepts native pointer events in that region even though the dialog renders above it. The center of the X does not hover or close the dialog; the lower edge below the drag strip remains clickable.
Reproduction:
- In the desktop app, open Settings → Appearance → Themes → Add theme.
- Select Dracula under Popular, or search for it, and wait for results.
- With the expanded modal near the top of the window, click the center of the X, then its bottom edge.
Reproduced on macOS with native pointer input: two center clicks left the dialog open, while a lower-edge click closed it. Browser checks at 1280×900 and 1280×720 passed even before the fix, which narrowed the problem to desktop hit testing.
Verification#
- Reproduced the failure in an isolated Electron 44.1.0 window rendering the real
ThemeImportDialogandWorkspacePageHeader. With the desktop drag region still enabled, the fixed X shows its hover state and closes on a native center click. - Repeated the original theme-search/close flow in the full local web app after the fix.
- Full web unit suite: 351 files, 4,453 tests passed.
- Web typecheck and targeted lint/format checks passed; standards and spec reviews found no issues.
The native pointer check is the regression proof here: the existing non-browser unit suite cannot exercise Electron's window-drag hit testing. No class-string assertion was added.
UI Changes#
Evidence uses an isolated reproduction with no user data. Screenshots and video are cropped to the dialog header and search controls. The video labels mark the tested click locations; pauses are trimmed.
Before: the pointer is over the X center, but the hover background does not appear.
After: the same center position shows the existing hover background.
Native interaction recording (11 seconds): center click ignored before the fix; bottom-edge click succeeds; center click succeeds after the fix.
https://github.com/user-attachments/assets/958a5e5e-6e1a-4ace-978e-5714b5780dfd
Checklist#
- This PR is small and focused
- I explained what changed and why
- I included before/after screenshots for any UI changes
- I included a video for animation/interaction changes
Implemented with GPT-6-Astra in the Codex harness.
Summary by CodeRabbit#
- Bug Fixes
- Improved dialog interaction in webkit-based desktop apps by ensuring dialog popups can be selected and interacted with independently of draggable window areas.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
Bugbot is paused — on-demand spend limit reached
Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.
A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.
Bugbot is paused — on-demand spend limit reached
Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.
A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.
juliusmarminge closed this
Sign in to join this conversation.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
7f23b20f-8ce6-4a70-b2c7-1135d7ef11c2📥 Commits
Reviewing files that changed from the base of the PR and between 61f35d13d73e46359ce105bffb3ac89fc318b784 and 1902f5052e95d0ebf0cd854cdd1a5333dcd64696.
📒 Files selected for processing (1)
apps/web/src/components/ui/dialog-styles.tsIncluded review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough#
The dialog popup class now marks the popup as outside the WebKit draggable window region. All other dialog classes remain unchanged.
Changes#
Dialog popup interaction
apps/web/src/components/ui/dialog-styles.tsDIALOG_POPUP_BASE_CLASSnow includes[-webkit-app-region:no-drag]at the start of its class string.Priority: ⬇️ Low
Estimated code review effort: 1 (Trivial) | ~2 minutes
Change: Bug fix
Suggested reviewers:
chrisdeemingMerge Risk: ⚪ Minimal · up to
1902fThe popup controls are excluded from the native drag region, preserving interaction without introducing merge-blocking risk.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands.