Skip to content

bug: Chat Component Re-renders and Causes Layout Shifts on Small Screens #2609

Open
@lildinozzz

Description

@lildinozzz

When opening the chat on smartphones, after the component is mounted, a re-render occurs, causing the message list to jump to the middle of the conversation. This results in an unpleasant lag or jump, affecting the user experience.

To Reproduce

Steps to reproduce the behavior:

  1. Open the chat on a smartphone.
  2. Wait for the component to mount.
  3. Ensure there are many messages in the conversation.
  4. Observe the message list jumping to the middle of the conversation after re-rendering.
  5. Feel the slight lag or visual jump.

Expected behavior
The message list should remain at the last message without shifting or jumping after the component is mounted and re-rendered.

Component Mounts:
Image

After 1 second:
Image

Package version
"stream-chat": "^8.47.1",
"stream-chat-react": "^12.8.1",

Smartphone (please complete the following information):
Device: iPhone 15 Pro
OS: iOS (latest version)
Browser: Chrome, Safari (latest versions)

The issue occurs specifically on smartphones, with recent versions of Chrome and Safari browsers. After the chat component mounts, the message list jumps to the middle of the conversation, creating an unpleasant feeling of lag or stuttering.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions