]> cat aescling's git repositories - mastodon.git/commitdiff
Only consider mouse move in scrolling on item insertion (#9262)
authorLes Orchard <me@lmorchard.com>
Sun, 11 Nov 2018 22:20:20 +0000 (17:20 -0500)
committerEugen Rochko <eugen@zeonfederated.com>
Sun, 11 Nov 2018 22:20:20 +0000 (23:20 +0100)
Fixes #9259

app/javascript/mastodon/components/scrollable_list.js

index 7551d0b1fe4202e98b37945d8ac5329c2cd2dbb9..ab4e7d59cfe0ba9feeb329afc3c0fe12878aa140 100644 (file)
@@ -136,7 +136,7 @@ export default class ScrollableList extends PureComponent {
       React.Children.count(prevProps.children) < React.Children.count(this.props.children) &&
       this.getFirstChildKey(prevProps) !== this.getFirstChildKey(this.props);
 
-    if ((someItemInserted && this.node.scrollTop > 0) || this.mouseMovedRecently) {
+    if (someItemInserted && (this.node.scrollTop > 0 || this.mouseMovedRecently)) {
       return this.node.scrollHeight - this.node.scrollTop;
     } else {
       return null;