Skip to content

Fix web file pickers and settings links not opening - #62

Merged
wassgha merged 1 commit into
mainfrom
cursor/fix-web-file-picker-links-2a49
Aug 2, 2026
Merged

wassgha merged 1 commit into
mainfrom
cursor/fix-web-file-picker-links-2a49

Conversation

@wassgha

@wassgha wassgha commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the web-only report where browse never opens a file dialog (DnD still works), settings links do nothing, and Chrome shows no “popups blocked” indicator.

Root causes addressed:

  1. File pickers used display: none inputs + synthetic input.click(). That pattern fails in some Chromium setups; drag-and-drop still works. Upload / transcript import now use label-activated sr-only inputs.
  2. Import transcript deferred input.click() to requestAnimationFrame, which drops the user gesture so Chrome never shows the dialog. The picker now opens in the same turn as the click.
  3. Settings links could be covered by the popover dismiss backdrop when it stayed in-tree while the panel was portaled (stacking-context mismatch). The backdrop is portaled with the panel, and settings anchors stop pointer propagation so dismiss logic cannot swallow the navigation.

Test plan

  • On web (Chrome): click the upload dropzone / “browse” — OS file picker opens
  • Drag-and-drop a media file onto the dropzone still works
  • Open Import transcript from the source menu — file picker opens immediately
  • Open Settings → click Discord / GitHub / X / Report an issue — each opens in a new tab
  • Appearance toggle in Settings still works; clicking outside still dismisses the menu
  • In the editor, Import on the transcript bar still opens a picker
  • Desktop (Electron) menus / file flows still behave (backdrop still covers drag regions)
Open in Web Open in Cursor 

Browse relied on display:none inputs plus synthetic click(), which fails in
some Chromium setups while drag-and-drop still works. Switch upload/import
pickers to label-activated sr-only inputs, open the import dialog in the same
user gesture (no rAF), and portal popover backdrops so they cannot stack above
menu links and swallow clicks.

Co-authored-by: Wassim Gharbi <wassgha@gmail.com>
@wassgha
wassgha marked this pull request as ready for review August 2, 2026 21:29
@wassgha
wassgha merged commit 45cbc50 into main Aug 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants