You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using useLongPress with in a custom context menu component to support touch devices. Now when the longPressProps are passed to the container element, text can no longer be selected. usePress has an option to enable it, but this is not accepted by the useLongPress hook.
🤔 Expected Behavior?
Allow to set allowTextSelectionOnPress on the useLongPress hook
These gestures directly conflict though. Long press is the gesture to select text on iOS. So if you're doing a different action on long press, I'm not sure it makes sense to also select text. You probably want either one or the other.
That makes sense, the idea is also to only allow selection on mouse input devices. But perhaps there is a better way to check the device type in the touch event?
Provide a general summary of the issue here
I'm using useLongPress with in a custom context menu component to support touch devices. Now when the longPressProps are passed to the container element, text can no longer be selected. usePress has an option to enable it, but this is not accepted by the useLongPress hook.
🤔 Expected Behavior?
Allow to set allowTextSelectionOnPress on the useLongPress hook
😯 Current Behavior
allowTextSelectionOnPress not supported
💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
Reproduction:
https://storybook.saas-ui.dev/?path=/story/components-overlay-contextmenu--basic
Code:
https://github.com/saas-js/saas-ui/blob/main/packages/saas-ui-core/src/menu/context-menu.tsx#L55
Version
"@react-aria/interactions": "^3.21.1",
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
Mac OS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: