mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-30 02:41:05 +02:00
Bugfix: Scroll to the bottom more reliably on new incoming messages.
Added some padding to the calculation which means the scrollbar can be scrolled up a bit and still get bumped down. Scroll a lot though and it will not keep bumping you down (parity with Angular)
This commit is contained in:
parent
e1aca588b5
commit
e80cf8a133
@ -114,7 +114,10 @@ module.exports = {
|
|||||||
|
|
||||||
if (this.refs.messageWrapper) {
|
if (this.refs.messageWrapper) {
|
||||||
var messageWrapper = this.refs.messageWrapper.getDOMNode();
|
var messageWrapper = this.refs.messageWrapper.getDOMNode();
|
||||||
this.atBottom = messageWrapper.scrollHeight - messageWrapper.scrollTop <= messageWrapper.clientHeight;
|
this.atBottom = (
|
||||||
|
messageWrapper.scrollHeight - messageWrapper.scrollTop <=
|
||||||
|
(messageWrapper.clientHeight + 150)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
room: MatrixClientPeg.get().getRoom(this.props.roomId)
|
room: MatrixClientPeg.get().getRoom(this.props.roomId)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user