mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-24 12:25:00 +08:00
web: disable autoscroll at top
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user