diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-05-05 17:18:55 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2018-05-05 17:18:55 +0200 |
commit | 32974a58dcf5a8db39a9c0378f923a40d787cad3 (patch) | |
tree | 2e1d516165c1649b0d26ceec3247062ba59b6959 /app/javascript | |
parent | 553cc2824040ba0b745644eb4633840129ffc13b (diff) |
[Glitch] Do not re-position scroll when loading more (inserting items from below)
Port 8c601b54ccf530bd193b4500fee439aa4e9162d0 to glitch-soc
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/flavours/glitch/components/scrollable_list.js | 2 |
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 56e91f864..b8281b1ee 100644 --- a/app/javascript/flavours/glitch/components/scrollable_list.js +++ b/app/javascript/flavours/glitch/components/scrollable_list.js @@ -86,7 +86,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.state.mouseOver) { + if (someItemInserted && this.node.scrollTop > 0 || (this.state.mouseOver && !prevProps.isLoading)) { return this.node.scrollHeight - this.node.scrollTop; } else { return null; |