feat: Maintain Scroll Position When Closing a Thread
Brief Title
Acceptance Criteria fulfillment
- [x] When a thread is closed, the scroll position should remain at the
ThreadMainMessage.
Fixes #972
Video/Screenshots
Screencast from 2025-02-10 01-22-36.webm
Details
setJumpToMessage also uses document.getElementById, element.scrollIntoView and a small setTimeout to delay closing the thread, to scroll to a message (in MessageAggregator.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.
Hi @Abbas-Askari
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!
@Spiral-Memory I have removed scrolling to bottom on staring/unstaring, pinning/unpining, copying, copying link, and qouting. Ready for Merge!
Fixed Linting issues.