From 4124a8dcffe40287c3c2537d7cc2bbe3713d1f7a Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Mon, 12 Jun 2017 06:19:12 +0100 Subject: [PATCH] Save scroll state immediately before updating Signed-off-by: Oliver Hunt --- 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 a652bcc827..1f324d059f 100644 --- a/src/components/structures/ScrollPanel.js +++ b/src/components/structures/ScrollPanel.js @@ -160,6 +160,10 @@ module.exports = React.createClass({ this.checkFillState(); }, + componentWillUpdate: function(nextProps, nextState) { + this._saveScrollState(); + }, + componentDidUpdate: function() { // after adding event tiles, we may need to tweak the scroll (either to // keep at the bottom of the timeline, or to maintain the view after