-
Notifications
You must be signed in to change notification settings - Fork 602
auto scroll to top after new items appended inside @totop event #270
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
Comments
Actualy you can't keep scroll position stay where it was before rendering new contents to head. The way you can do is scrollTo an offset which is the addition items all height like chat-room demo. |
@tangbc I've seen this demo, but it does not work, because |
|
@tangbc Latest Chrome. it sure does support ResizeObserver. |
I also seem to be seeing this issue, with |
@xrei Did you find any workable solution? I also encountered this problem |
This fix caused the problem,but I don't know why he did that. |
Let say we have and some list of items, in the
@totop
event i fetch more items and concatenate them, and after that scroll immediately goes to 0 (at the very top) which is wrong, it should stay where it was before fetching new items.is there any solutions?
actually i made one by finding id of last message before fetching new ones and finding that message in new list then
scrollToIndex
but the scroll still glitches i see that transition after very top to the index. it looks awful :(The text was updated successfully, but these errors were encountered: