element-hq / element-hq/element-web

Anchor Chat to Bottom if Already Scrolled Down and Typing

Open
#15,151 1 comment 1 reaction 0 assignees View on GitHub
A-Timeline P2 T-Enhancement
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Description
When a user is typing a new message, as the message length increases, the user starts blocking the message above from view. This is usually the very message the user is replying to, so the message should remain in view without having to scroll back to it manually.

### Steps to reproduce
- Have a message above in the chat room.
- Type a message which is 3-4 lines long, or just spam line breaks.

I would expect the chat to automatically scroll down, or anchor itself to the bottom if it's already scroll to the bottom.
Edit: This is also the same behavior that Discord, Gitter, and MatterMost have.

The current behavior is acceptable as is if the user does not currently have their scroll position set to the bottom of the chat when they're typing.

Logs being sent: no

![actual](https://user-images.githubusercontent.com/22801583/92884485-2c6ab200-f412-11ea-8540-73eea77fc84f.gif)

### Version information

- **Platform**: Both

For the web app:

- **Browser**: Firefox 80.0.1 64-bit
- **OS**: Linux
- **URL**: develop.element.io

For the desktop app:

- **OS**: Linux
- **Version**: 1.7.5

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.