about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-01-08 21:29:49 +0100
committerThibG <thib@sitedethib.com>2019-01-10 12:09:12 +0100
commite8ae77236be07935c0dd03795d9de1db71d4283e (patch)
tree1b9d3ac94399517c7b7e6a9a66a388f8a15b3471 /app
parent825decbf9ecfb60228cfa292a5d94d0ddc9d5998 (diff)
[Glitch] Only consider mouse move in scrolling on item insertion
Port cc1f13dfd0d9fee7d568918af031f1cd6d1441f4 to glitch-soc
Diffstat (limited to 'app')
-rw-r--r--app/javascript/flavours/glitch/components/scrollable_list.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/components/scrollable_list.js b/app/javascript/flavours/glitch/components/scrollable_list.js
index 09a22f633..7cd0774a9 100644
--- a/app/javascript/flavours/glitch/components/scrollable_list.js
+++ b/app/javascript/flavours/glitch/components/scrollable_list.js
@@ -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;