]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Only consider mouse move in scrolling on item insertion
authorThibaut Girka <thib@sitedethib.com>
Tue, 8 Jan 2019 20:29:49 +0000 (21:29 +0100)
committerThibG <thib@sitedethib.com>
Thu, 10 Jan 2019 11:09:12 +0000 (12:09 +0100)
Port cc1f13dfd0d9fee7d568918af031f1cd6d1441f4 to glitch-soc

app/javascript/flavours/glitch/components/scrollable_list.js

index 09a22f6335ce6351da42d7b71d7ff7f0e1f9de0a..7cd0774a9365eea92312ecd0d35991142e6c596e 100644 (file)
@@ -145,7 +145,7 @@ export default class ScrollableList extends PureComponent {
     const someItemInserted = React.Children.count(prevProps.children) > 0 &&
       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;