Text Selection on components utilizing usePress underneath #3761
Unanswered
omacranger
asked this question in
Q&A
Replies: 1 comment 2 replies
-
A quick and dirty workaround would be to delete some of the event handlers returned by useBreadcrumbItem (aka the click and pointer handlers) since those are responsible for disabling text selection on click/touch. The team is discussing what to do at the hook level but there are some additional wrinkles there. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey all, we've had some individuals report frustrating when attempting to select text on something that leverages usePress underneath (which appears to have allowTextselection) disabled by default. For example, something like useBreadcrumbItem -> useLink -> usePress disables text selection by default. For clickable items, that makes since (links wouldn't really support that). But for the 'current' item, which is generally rendered as text / non-interactive, it prevents selection on the page. Are there any workarounds? I see the restoreTextSelection helpers are not exported / used internally only.
Beta Was this translation helpful? Give feedback.
All reactions