Skip to content

Commit

Permalink
Fix auto-loading-more when not scrolled (mastodon#27286)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Oct 5, 2023
1 parent 32ab474 commit 2b98e2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/mastodon/components/scrollable_list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class ScrollableList extends PureComponent {
const clientHeight = this.getClientHeight();
const offset = scrollHeight - scrollTop - clientHeight;

if (400 > offset && this.props.onLoadMore && this.props.hasMore && !this.props.isLoading) {
if (scrollTop > 0 && offset < 400 && this.props.onLoadMore && this.props.hasMore && !this.props.isLoading) {
this.props.onLoadMore();
}

Expand Down

0 comments on commit 2b98e2e

Please sign in to comment.