From 6a67342d02b9afab8dcedb01ef4399d8fe07f6dd Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 4 Dec 2015 12:02:54 +0000 Subject: [PATCH] Comment + 1 --- src/components/structures/RoomView.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 4320724334..b7ae42ad67 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -362,6 +362,7 @@ module.exports = React.createClass({ if (this.refs.messagePanel) { var messageWrapperScroll = this._getScrollNode(); var wasAtBottom = this.atBottom; + // + 1 here to avoid fractional pixel rounding errors this.atBottom = messageWrapperScroll.scrollHeight - messageWrapperScroll.scrollTop <= messageWrapperScroll.clientHeight + 1; if (this.atBottom && !wasAtBottom) { this.forceUpdate(); // remove unread msg count