Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
- the target offset can go past what the scrollable reaches, so after a change of direction nothing scrolled until the target came back. The next step now starts from the real offset in that case - the time spent outside of the activation zone counted as elapsed time, so the first step after returning to the zone was up to 100 ms worth of scrolling
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Auto scroll steps smaller than 1px were dropped, so speeds below about 60px/s at 60Hz (120px/s at 120Hz) never scrolled and the outer part of the activation area did nothing.
The steps now add up in the target offset. The native scroll call is still skipped until the target is at least 1px away from the current offset.
Also removes two delays in the same code, which the slow speeds made noticeable:
autoScrollInterval(300ms by default on Android with the New Architecture) the first step after returning now waits one interval, the same as the very first one, instead of jumping right away.Testing
New jest tests, all fail on main. The scroll speeds are unchanged (992 / 198.4 / 49.6px in 1s at 1000 / 200 / 50px/s before and after).
before-test-on-main.txtafter-test-with-fix.txt