From 15398a53bd04fafa8143fe5fc729847759e0af34 Mon Sep 17 00:00:00 2001 From: hanguofang Date: Tue, 15 Apr 2025 22:43:57 +0800 Subject: [PATCH] fix: the problem that the pull down refresh function fails when scrolling to the bottom --- src/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index 2782fbb..ed31cb9 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -309,6 +309,10 @@ export default class InfiniteScroll extends Component { ? document.documentElement : document.body; + // fix scrollTop is not updated, + // fix: the problem that the pull down refresh function fails when scrolling to the bottom + this.lastScrollTop = target.scrollTop; + // return immediately if the action has already been triggered, // prevents multiple triggers. if (this.actionTriggered) return; @@ -324,7 +328,6 @@ export default class InfiniteScroll extends Component { this.props.next && this.props.next(); } - this.lastScrollTop = target.scrollTop; }; render() {