From 2b98e2ecd6224ad41d38f5febd31efa7e4de316d Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 5 Oct 2023 16:33:54 +0200 Subject: [PATCH] Fix auto-loading-more when not scrolled (#27286) --- app/javascript/mastodon/components/scrollable_list.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/mastodon/components/scrollable_list.jsx b/app/javascript/mastodon/components/scrollable_list.jsx index 7672a4e42..79dc48136 100644 --- a/app/javascript/mastodon/components/scrollable_list.jsx +++ b/app/javascript/mastodon/components/scrollable_list.jsx @@ -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(); }