We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2604a7 commit 206d848Copy full SHA for 206d848
assets/js/app.js
@@ -44,6 +44,19 @@ window.Hooks.InfiniteScroll = {
44
45
updated() {
46
this.pending = false
47
+
48
+ // Check if we're still at the bottom after loading content
49
+ // Use requestAnimationFrame to ensure DOM has fully updated
50
+ requestAnimationFrame(() => {
51
+ const target = this.el
52
+ const rect = target.getBoundingClientRect()
53
+ const isIntersecting = rect.top <= (window.innerHeight || document.documentElement.clientHeight)
54
55
+ if (isIntersecting && !this.pending) {
56
+ this.pending = true
57
+ this.pushEvent("load-more", {})
58
+ }
59
+ })
60
}
61
62
0 commit comments