aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/utils.js')
-rw-r--r--web/src/js/utils.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/web/src/js/utils.js b/web/src/js/utils.js
index b475980a..7541e98d 100644
--- a/web/src/js/utils.js
+++ b/web/src/js/utils.js
@@ -2,7 +2,11 @@
var AutoScrollMixin = {
componentWillUpdate: function () {
var node = this.getDOMNode();
- this._shouldScrollBottom = node.scrollTop + node.clientHeight === node.scrollHeight;
+ this._shouldScrollBottom = (
+ node.scrollTop !== 0
+ &&
+ node.scrollTop + node.clientHeight === node.scrollHeight
+ );
},
componentDidUpdate: function () {
if (this._shouldScrollBottom) {