-
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
Add setTimeout for mousemove handler #5919
Add setTimeout for mousemove handler #5919
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.
LGTM
Hi! Thanks for the PR! Do you think it's possible to add test here to prevent future regression? |
I've tried, couldn't add a test for the mouse leaving the window to cause a scroll |
No worries, can you pls then add a code comment to explain I'll merge it right after you have comment + follow up issue to write test. |
Fixes
Selection is getting stuck and the page is not getting scrolled automatically
Happens in Chrome, not in Firefox
The problem is that the order of events
mousemove
andselectionchange
is not deterministic. Whenmousemove
is handled before it preventsselectionchange
handler from executing fully resulting in this bug.