-
Notifications
You must be signed in to change notification settings - Fork 296
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
feat: Maintain Scroll Position When Closing a Thread #973
base: develop
Are you sure you want to change the base?
Conversation
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 |
Sure! I update! |
…ning, copying, copying link, and qouting
@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 |
@@ -268,10 +268,14 @@ const ChatBody = ({ | |||
}; | |||
|
|||
useEffect(() => { | |||
if (messageListRef.current) { | |||
messageListRef.current.scrollTop = messageListRef.current.scrollHeight; | |||
const lastMessage = messages[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please explain this change ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed Linting issues. |
Brief Title
Acceptance Criteria fulfillment
ThreadMainMessage
.Fixes #972
Video/Screenshots
Screencast.from.2025-02-10.01-22-36.webm
Details
setJumpToMessage
also usesdocument.getElementById
,element.scrollIntoView
and a smallsetTimeout
to 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.