-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix text click selection on touch devices #3098 #4395
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, can you expand on why a click
solution vs selectionchange
?
I don't know the exact cause of this, but inside the selectionchange event handler the value of domSelection.anchorNode is null, however in onClick it is not. This happens only with touch event, with mouse it is as expected. touch-selection-debug.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, while I'm not too sure this addresses the root cause let's merge this for now as it addressed an immediate issue
Correction: the click handler is likely the best place given that the similar |
Fix text click selection on touch devices facebook#3098 (facebook#4395)
This PR fixes #3098