-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Reverse scroll with dynamic height stops before actual top end #432
Comments
thanks for the quick reply @inokawa I came across this blog https://lovemewithoutall.github.io/it/setting-scrollTop-on-momentum-scroll/ which suggests a workaround I assume you have tried this and it did not work? |
A similar workaround is used for an edge case in iOS Safari. It will apply scroll position but also stops the scrolling. Lines 283 to 286 in a567e46
Maybe there is room for improvement, but basically I think it's inevitable in reverse virtual scrolling with dynamic sized items. |
Describe the bug
In reverse scroll mode on iOS Safari, if the content have dynamic height and dynamic loading(just speculation), the scroll will end prematurely before the actual top of the list is reached. If you try to pull down immediately when the scroll stops, it still won't readjust and render more items on top. A short moment is required after scroll stops for more items to be rendered on top.
Simulator.Screen.Recording.-.iPhone.15.Plus.-.2024-04-20.at.14.55.14.mp4
To Reproduce
Use an iPhone or simulator, go to any of these examples, start scrolling up
It doesn't happen in the reverse example https://inokawa.github.io/virtua/?path=/story/basics-vlist--reverse , so I'm assuming it's got something to do with dynamically prepending items causing the height to be wrong?
Expected behavior
scroll should not stop before the actual top.
Platform:
Additional context
The text was updated successfully, but these errors were encountered: