]> cat aescling's git repositories - mastodon.git/commitdiff
Do not modify scroll position unless content has been added to the top, not bottom
authorEugen Rochko <eugen@zeonfederated.com>
Mon, 7 Nov 2016 01:11:38 +0000 (02:11 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 7 Nov 2016 01:11:38 +0000 (02:11 +0100)
app/assets/javascripts/components/components/status_list.jsx

index 633f068168d3e59341598503d08233ede196618c..58aa94cc0119b59343c00b4f10ebaca92b605630 100644 (file)
@@ -46,7 +46,7 @@ const StatusList = React.createClass({
   },
 
   componentDidUpdate (prevProps) {
-    if (prevProps.statusIds.size < this.props.statusIds.size && this._oldScrollPosition) {
+    if (prevProps.statusIds.size < this.props.statusIds.size && prevProps.statusIds.first() !== this.props.statusIds.first() && this._oldScrollPosition) {
       const node = ReactDOM.findDOMNode(this);
 
       if (node.scrollTop > 0) {