diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-12-12 19:43:55 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-12-12 19:43:55 +0100 |
commit | 3b55889310ea1ba392d3b02909d4e9affc09aa3f (patch) | |
tree | eef80373cb23f012c13246f4c6da9907c51a64ae /web/src | |
parent | 588d6dbe22630333a4da6b4cb92158c25c4b858e (diff) | |
download | mitmproxy-3b55889310ea1ba392d3b02909d4e9affc09aa3f.tar.gz mitmproxy-3b55889310ea1ba392d3b02909d4e9affc09aa3f.tar.bz2 mitmproxy-3b55889310ea1ba392d3b02909d4e9affc09aa3f.zip |
web: disable autoscroll at top
Diffstat (limited to 'web/src')
-rw-r--r-- | web/src/js/utils.js | 6 |
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) { |