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 and audiodude committed Oct 23, 2023
1 parent f5c7bdd commit f97310b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/mastodon/components/scrollable_list.jsx
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 f97310b

Please sign in to comment.