Skip to content
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

[stable14] Fix the scroll position of the chat view in the sidebar #1303

Conversation

danxuliu
Copy link
Member

@danxuliu danxuliu commented Nov 20, 2018

Backport of #1302 and #1304

The calls to the default methods from the server to open and close the
sidebar had to be replaced by their implementation to be able to also
trigger an event when the animation ends.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Calling "restoreScrollPosition" twice caused the chat view to be
scrolled to the top due to not taking into account the current scroll
position.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When the chat view was in the sidebar, the scroll position of the chat
view was reset to the top every time that the sidebar was closed and
opened again or the chat tab was selected after changing to a different
one.

The reason is that detaching an element and attaching it again, which
happens in both scenarios, resets the scroll position of the element, so
now the scroll position is explicitly saved before closing the sidebar
or unselecting the chat tab and restored again after opening the sidebar
or selecting the chat tab again.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@Ivansss Ivansss merged commit f71e714 into stable14 Nov 21, 2018
@Ivansss Ivansss deleted the stable14-1302-fix-the-scroll-position-of-the-chat-view-in-the-sidebar branch November 21, 2018 14:20
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.

2 participants