RocketChat / RocketChat/Rocket.Chat

Thread close scrolls main chat back after opening thread in narrow responsive layout

Open
#41,132 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description

When using Rocket.Chat with a narrow window width, opening a thread can make the thread view cover the full chat width. After closing the thread, the main chat view unexpectedly jumps back many messages instead of staying at the same scroll position.

This looks like a scroll-position restoration issue in the responsive / narrow-width thread layout.

Steps to reproduce
  1. Open a channel, for example:
    https://open.rocket.chat/channel/desktop
  2. Scroll up a little bit in the message list.
  3. Reduce the browser or desktop app window width.
  4. Click View thread on a message.
  5. Make sure the thread view covers the full chat width. If it does not, reduce the window width further.
  6. Close the thread.
Expected behavior

The thread is closed and the main chat view keeps its previous scroll position.

Actual behavior

The thread is closed, but the main chat view jumps back many messages.

Notes

This is different from the general behavior described in #32710, because the jump happens when closing the thread after the thread has been opened in the narrow responsive layout where it covers the full chat width.

Environment
  • Rocket.Chat server: reproducible on open.rocket.chat
  • Client: Web browser, Firefox 152

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in a narrow browser window using the listed channel and thread-opening steps. Trace the responsive thread open and close flow and its scroll-position handling; done means closing a full-width thread preserves the main chat's prior scroll position.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.