-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Scroll position doesn't stay at the bottom when viewport height changes #301
Comments
Hi, this behavior is currently expected one. What do you need it for? |
I use it for a chat app. It seemed logical to me, that scroll position stays at the bottom. When a user opens a chat and then resizes the window, I would be weird not to see the very beginning of the conversation. Do you think this behavior might be wrong in some cases? Could it stay at the bottom for |
Thanks. It seems worth implementing. |
Hi @inokawa! Do you have any estimates for this issue? |
It's planned but not right away. |
hi @inokawa do you a rough idea on how you would implement it? I would like to help with this feature |
This library doesn't know the current distance to the bottom end. It's necessary restriction to support #315. So I would add virtua/stories/react/basics/VList.stories.tsx Lines 600 to 607 in a567e46
|
@inokawa so this means that users need to have an ability to scroll to bottom synchronously. Now it's not possible |
Both may need onResize like prop but not sure. |
Describe the bug
If scroll reaches the very bottom position, it stays at the bottom when items are resized. It actually works and looks like expected behavior to me.
However, when viewport size changes, it doesn't work like this (see attached video)
https://github.com/inokawa/virtua/assets/37265338/dcd04cd9-4682-4d12-af6d-3e9dd75f185e
To Reproduce
Expected behavior
I think, scroll position should stay at the bottom on any size changes
Platform:
The text was updated successfully, but these errors were encountered: