Skip to content

Prevent forced auto-scroll while viewing previous chat messages #6

Description

@dimple9079

The chat interface currently scrolls to the bottom after every update using the afterUpdate lifecycle hook.

As a result, whenever a new message arrives, users are automatically pushed to the latest message even if they are reading older chat history.

Current behavior:

  • User scrolls upward to read previous messages
  • A new message arrives
  • Chat instantly jumps back to the bottom

Expected behavior:

  • Auto-scroll only when the user is already near the bottom of the chat
  • Preserve the user's scroll position when reviewing older messages

Suggested Improvement:
Before performing automatic scrolling, check whether the user is already near the bottom of the message container. Only trigger auto-scroll when appropriate.

Benefits:

  • Improved chat usability
  • Better reading experience
  • Consistent behavior with modern messaging applications
  • Prevents interruption while reviewing conversation history

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions