Improve automatic scrolling behaviour when new messages arrive#564
Merged
nickvergessen merged 1 commit intoJan 10, 2018
Merged
Conversation
Ivansss
approved these changes
Jan 10, 2018
Member
|
I just noticed, that in the guest view, the chat is scrolled to the top, so it shows the oldest messages and not the newest |
When the chat messages are shown from newest to oldest and a new message arrives the list is automatically scrolled to keep the current visible messages at the same place, except if the list was at the top, in which case no scrolling is made and the new message appears. When the chat messages are shown from oldest to newest and a new message arrives the list is automatically scrolled to show the new message, except if the list was not at the bottom in which case no scrolling is made and the current visible messages are kept at the same place. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
83b8791 to
3c0587f
Compare
Member
Author
Fixed (a |
nickvergessen
approved these changes
Jan 10, 2018
4 tasks
marcoambrosini
pushed a commit
that referenced
this pull request
Oct 9, 2019
Remove code disabled actions remnants
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.
When a new message arrives the list of messages is automatically scrolled to show the new message,
except if the list was not at the bottom in which case no scrolling is made and the current visible messages are kept at the same place. Basically this auto scrolls, except if the user is checking older messages.
There are still some details that should be improved regarding scrolling:
position()on a comment returns where it should be instead of where it is due to a negative margin. Not a big deal, though; it works anyway if the last message is visible even if the list is not fully scrolled to the bottom (that is, if the bottom margin of the last message is partially hidden).