Skip to content

[pull] main from tldraw:main#528

Merged
pull[bot] merged 1 commit intocode:mainfrom
tldraw:main
May 3, 2026
Merged

[pull] main from tldraw:main#528
pull[bot] merged 1 commit intocode:mainfrom
tldraw:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 3, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

…8741)

In order to make the long-press context menu usable on touch devices,
this PR fixes a bug where the menu opened on iOS but closed the moment
the user lifted their finger (#8740).

Radix's `ContextMenu` Trigger has its own 700ms touch long-press
detection that is independent of tldraw's `long_press` event. When that
timer fires, the menu opens while the same touch is still down. The
pointerup that follows is read by the dismissable layer as an outside
interaction and dismisses the menu before the user can choose anything.

The fix swallows outside-interaction dismissals during a 500ms grace
window after the menu opens, but only on coarse pointers — desktop
right-click is untouched.

### Change type

- [x] `bugfix`

### Test plan

1. On iOS Safari (or a touch-emulated browser), long-press the canvas in
the examples app or on tldraw.com.
2. Confirm the context menu opens and stays open after the finger is
lifted.
3. Tap a menu item; confirm the action runs and the menu closes.
4. Tap somewhere outside the menu (a fresh touch) and confirm the menu
dismisses.
5. On desktop, right-click the canvas; confirm the menu opens, an item
can be selected, and an outside click dismisses it normally.

- [ ] Unit tests
- [ ] End to end tests

### Release notes

- Fix the iOS context menu closing immediately after a long-press
release.

### Code changes

| Section   | LOC change |
| --------- | ---------- |
| Core code | +20 / -2   |
@pull pull Bot locked and limited conversation to collaborators May 3, 2026
@pull pull Bot added the ⤵️ pull label May 3, 2026
@pull pull Bot merged commit ef2aad7 into code:main May 3, 2026
@pull pull Bot had a problem deploying to bemo-canary May 3, 2026 15:13 Failure
@pull pull Bot had a problem deploying to deploy-production May 3, 2026 15:13 Failure
@pull pull Bot had a problem deploying to bemo-canary May 3, 2026 15:13 Failure
@pull pull Bot had a problem deploying to npm deploy May 3, 2026 15:13 Failure
@pull pull Bot had a problem deploying to deploy-staging May 3, 2026 15:13 Error
@pull pull Bot had a problem deploying to vsce publish May 3, 2026 15:13 Failure
@pull pull Bot had a problem deploying to npm deploy May 3, 2026 15:13 Failure
@pull pull Bot had a problem deploying to deploy-staging May 3, 2026 15:13 Failure
@pull pull Bot had a problem deploying to deploy-staging May 4, 2026 00:45 Failure
@pull pull Bot temporarily deployed to e2e-dotcom May 4, 2026 02:37 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant