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

feat: Maintain Scroll Position When Closing a Thread #973

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Abbas-Askari
Copy link

@Abbas-Askari Abbas-Askari commented Feb 9, 2025

Brief Title

Acceptance Criteria fulfillment

  • 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.

@Abbas-Askari Abbas-Askari changed the title feat: Maintain Scroll Position When Closing a Thread #972 feat: Maintain Scroll Position When Closing a Thread Feb 9, 2025
@Spiral-Memory
Copy link
Collaborator

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

@Abbas-Askari
Copy link
Author

Sure! I update!

@Abbas-Askari
Copy link
Author

@Spiral-Memory I have removed scrolling to bottom on staring/unstaring, pinning/unpining, copying, copying link, and qouting.

Screencast.from.2025-02-10.19-23-55.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Maintain Scroll Position When Closing a Thread
2 participants