From fe9d7d10b97df96642485cf8bdb8073a40697c8d Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 29 Jan 2016 21:48:32 -0500 Subject: [PATCH] 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 --- src/components/structures/ScrollPanel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/structures/ScrollPanel.js b/src/components/structures/ScrollPanel.js index 8d26b2e365..e19b041219 100644 --- a/src/components/structures/ScrollPanel.js +++ b/src/components/structures/ScrollPanel.js @@ -160,8 +160,8 @@ module.exports = React.createClass({ // content. So don't call it in render() cycles. isAtBottom: function() { var sn = this._getScrollNode(); - // + 1 here to avoid fractional pixel rounding errors - return sn.scrollHeight - sn.scrollTop <= sn.clientHeight + 1; + // + 2 here to avoid fractional pixel rounding errors + return sn.scrollHeight - sn.scrollTop <= sn.clientHeight + 2; }, // check the scroll state and send out backfill requests if necessary.