mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-03 20:36:57 +03:00
Save scroll state immediately before updating
Signed-off-by: Oliver Hunt <oliver@hunt.bz>
This commit is contained in:
parent
2df32dfabd
commit
4124a8dcff
1 changed files with 4 additions and 0 deletions
|
@ -160,6 +160,10 @@ module.exports = React.createClass({
|
||||||
this.checkFillState();
|
this.checkFillState();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
componentWillUpdate: function(nextProps, nextState) {
|
||||||
|
this._saveScrollState();
|
||||||
|
},
|
||||||
|
|
||||||
componentDidUpdate: function() {
|
componentDidUpdate: function() {
|
||||||
// after adding event tiles, we may need to tweak the scroll (either to
|
// 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
|
// keep at the bottom of the timeline, or to maintain the view after
|
||||||
|
|
Loading…
Reference in a new issue