feat: Maintain Scroll Position When Closing a Thread#973
Closed
Abbas-Askari wants to merge 3 commits intoRocketChat:developfrom
Closed
feat: Maintain Scroll Position When Closing a Thread#973Abbas-Askari wants to merge 3 commits intoRocketChat:developfrom
Abbas-Askari wants to merge 3 commits intoRocketChat:developfrom
Conversation
Collaborator
|
Thanks for the fix, can you please also maintain scroll position whenever a message is starred / pinned/reacting to emojis etc.. some do, some don't.. Can we make it consistent |
Author
|
Sure! I update! |
…ning, copying, copying link, and qouting
Author
|
@Spiral-Memory I have removed scrolling to bottom on staring/unstaring, pinning/unpining, copying, copying link, and qouting. Ready for Merge! Screencast.from.2025-02-10.19-23-55.webm |
Abbas-Askari
commented
Feb 10, 2025
| useEffect(() => { | ||
| if (messageListRef.current) { | ||
| messageListRef.current.scrollTop = messageListRef.current.scrollHeight; | ||
| const lastMessage = messages[0]; |
Collaborator
There was a problem hiding this comment.
Can you please explain this change ?
Author
Author
|
Fixed Linting issues. |
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.

Brief Title
Acceptance Criteria fulfillment
ThreadMainMessage.Fixes #972
Video/Screenshots
Screencast.from.2025-02-10.01-22-36.webm
Details
setJumpToMessagealso usesdocument.getElementById,element.scrollIntoViewand a smallsetTimeoutto delay closing the thread, to scroll to a message (inMessageAggregator.js). I have used the same procedure.PR Test Details
Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-973 after approval.