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
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 and selectionchange is not deterministic. When mousemove is handled before it prevents selectionchange handler from executing fully resulting in this bug.
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 setTimeout presence and TODO with newly created issue number that shall address lack of test here. So someone else (maybe me), can take a look at the test.
I'll merge it right after you have comment + follow up issue to write test.
No worries, can you pls then add a code comment to explain setTimeout presence and TODO with newly created issue number that shall address lack of test here. So someone else (maybe me), can take a look at the test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
5 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
mousemoveandselectionchangeis not deterministic. Whenmousemoveis handled before it preventsselectionchangehandler from executing fully resulting in this bug.