Skip to content

fix(mobile): don't open Android markdown links on text-selection drag - #54

Closed
macodev00 wants to merge 73 commits into
mainfrom
cursor/android-markdown-link-selection-dffe
Closed

macodev00 wants to merge 73 commits into
mainfrom
cursor/android-markdown-link-selection-dffe

Conversation

@macodev00

@macodev00 macodev00 commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

What Changed

On Android, a markdown link press is ignored when the finger moves far enough to count as a text-selection drag. A normal tap still opens the link, including http(s) URLs and file references. The movement check lives in apps/mobile/modules/t3-markdown-text/src/androidLinkPress.ts with unit tests in androidLinkPress.test.ts.

The gesture is kept on a ref and read only from the press handlers. Nothing passes that ref into a helper during render, so react/refs passes without a suppression.

Why

Nested selectable Text reports an empty press rect on Android, so React Native still fires onPress on finger-up after a selection drag. That opened the link and dismissed the selection the user was making. Movement is tracked directly because an empty onLongPress does not cover a drag.

Fixes pingdotgg#13766

UI Changes

No visual change. Dragging to select text that starts on a link no longer opens the link; tapping is unchanged. iOS is unaffected. The interaction is covered by unit tests.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes (no visual change)
  • I included a video for animation/interaction changes (no Android device here; covered by unit tests)

This draft is against the fork's stale main. The reviewable change is one commit on cursor/android-markdown-link-selection-dffe, which is one commit ahead of pingdotgg/t3code main. Open the ready PR there.

Open in Web Open in Cursor 

aaditagrawal and others added 30 commits September 25, 2026 16:04
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
…rotocol variables (pingdotgg#13492)

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…and WSL backends (pingdotgg#13641)

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
…gg#13705)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…13701)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…13685)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gdotgg#13684)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gdotgg#13698)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…equests (pingdotgg#13704)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gg#13694)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ingdotgg#13688)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
pingdotgg#13693)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…oading it twice (pingdotgg#13683)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… in memory (pingdotgg#13686)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…he whole thread list (pingdotgg#13691)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Bil0000 and others added 27 commits September 26, 2026 03:09
…otgg#13339)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ents, and idle polls (pingdotgg#13756)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…g into memory (pingdotgg#13763)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ates per comparison (pingdotgg#13759)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ngdotgg#13761)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…le (pingdotgg#13765)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ingdotgg#13767)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…per (pingdotgg#13774)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…tgg#13764)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…th failed repacks (pingdotgg#13812)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…al (pingdotgg#13491)

Co-authored-by: eshaan Sood <eshaansood@192.168.1.14>
Co-authored-by: Gabriel De Andrade <30420087+gabrielelpidio@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…#13736)

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Nested selectable text reports an empty press rect, so finger-up still
fired onPress after a selection drag. Track movement in the press
handlers and ignore the press once it passes the selection slop.

Fixes pingdotgg#13766

Co-authored-by: maco <macodev00@users.noreply.github.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Sep 27, 2026
@macodev00 macodev00 closed this Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][Mobile] Android link opens instead of allowing text selection after a long-press drag