Skip to content
Snippets Groups Projects
Commit 8c601b54 authored by ThibG's avatar ThibG Committed by Eugen Rochko
Browse files

Do not re-position scroll when loading more (inserting items from below) (#7344)

parent a7e71bbd
Branches
Tags
1 merge request!8WIP: Backport from Mastodon FE main to support the "Direct messages" column and Lists
......@@ -72,7 +72,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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment