Skip to content

Conversation

@nickvergessen
Copy link
Member

Before scrollTo() was used, but this does not work when the window is not visible.
So now when the chat is in the background we scroll only half a line and stop following.
The user will see that something happened and have the anchor to jump to the bottom.

Same author (half a line) New author (half avatar)
Bildschirmfoto von 2021-01-20 16-35-17 Bildschirmfoto von 2021-01-20 16-33-34

cc @ma12-co @jancborchardt The main question is if the "scroll only half" behaviour is actually wanted, or if we should just scrolldown fully (as it was attempted to, but didn't do because scrollTo() only works on visible windows)

Before scrollTo() was used, but this does not work when the window is not visible.
So now when the chat is in the background we scroll only half a line and stop following.
The user will see that something happened and have the anchor to jump to the bottom.

Signed-off-by: Joas Schilling <[email protected]>
top: this.scroller.scrollHeight,
behavior: 'smooth',
})
this.setChatScrolledToBottom(true)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is actually what the biggest problem was. It removed the scroll-to-bottom button, although it wasn't scrolled to the bottom

@marcoambrosini marcoambrosini merged commit 1a7a81e into master Jan 20, 2021
@marcoambrosini marcoambrosini deleted the bugfix/noid/fix-scrolling-chat-when-in-background branch January 20, 2021 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants