From c89906e571f50e604a3e32033051ea3a67209ec0 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Mon, 21 Mar 2016 14:48:17 +0000 Subject: [PATCH] Only ignore scroll echoes once When the user scrolls up, and scrolls back to where they were, we want to save the final scroll state. We were ignoring it because it looked the same as the last autoscroll. Fixes https://github.com/vector-im/vector-web/issues/1162 --- src/components/structures/ScrollPanel.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/structures/ScrollPanel.js b/src/components/structures/ScrollPanel.js index 129cbd4581..2a11271232 100644 --- a/src/components/structures/ScrollPanel.js +++ b/src/components/structures/ScrollPanel.js @@ -170,6 +170,10 @@ module.exports = React.createClass({ this._saveScrollState(); } else { debuglog("Ignoring scroll echo"); + + // only ignore the echo once, otherwise we'll get confused when the + // user scrolls away from, and back to, the autoscroll point. + this._lastSetScroll = undefined; } this.props.onScroll(ev);