You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Fix improper scrolldown button display issue.
This fixes an intermittent issue where the scrolldown button or "new messages below" button would display even when the messages panel was scrolled to the very bottom. Furthermore, when new messages arrived, the messages panel would not automatically scroll down to show the new messages. Fixes https://github.com/vector-im/vector-web/issues/805
This commit is contained in:
@@ -160,8 +160,8 @@ module.exports = React.createClass({
|
|||||||
// content. So don't call it in render() cycles.
|
// content. So don't call it in render() cycles.
|
||||||
isAtBottom: function() {
|
isAtBottom: function() {
|
||||||
var sn = this._getScrollNode();
|
var sn = this._getScrollNode();
|
||||||
// + 1 here to avoid fractional pixel rounding errors
|
// + 2 here to avoid fractional pixel rounding errors
|
||||||
return sn.scrollHeight - sn.scrollTop <= sn.clientHeight + 1;
|
return sn.scrollHeight - sn.scrollTop <= sn.clientHeight + 2;
|
||||||
},
|
},
|
||||||
|
|
||||||
// check the scroll state and send out backfill requests if necessary.
|
// check the scroll state and send out backfill requests if necessary.
|
||||||
|
|||||||
Reference in New Issue
Block a user