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)pull/2/head
parent
e1aca588b5
commit
e80cf8a133
|
@ -114,7 +114,10 @@ module.exports = {
|
|||
|
||||
if (this.refs.messageWrapper) {
|
||||
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({
|
||||
room: MatrixClientPeg.get().getRoom(this.props.roomId)
|
||||
|
|
Loading…
Reference in New Issue