[context menu] `ContextMenuTrigger` long-press doesn't fire for stylus input
Open
component: context menu
type: bug
- Dominant language
- TypeScript
- Stars
- 10.9k
- Forks
- 543
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 101
Description
Hi! `ContextMenuTrigger`'s long-press path uses TouchEvents (`onTouchStart`/`Move`/`End`/`Cancel`), so it doesn't fire for stylus input. Apple Pencil on iOS Safari dispatches PointerEvents only, and most Surface pen and Wacom-style tablet setups are pointer-primary too. Would you consider switching to PointerEvents filtered to `pointerType === 'touch' || pointerType === 'pen'`? The 500ms timer, 10px movement tolerance, and cancellation logic would all carry over unchanged for finger touch, and stylus users would get the same long-press UX.
Happy to send a PR if you'd accept it.
Contributor guide
Assessment
This issue has not been assessed yet.