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 f5ee3f8 commit 0c4a93eCopy full SHA for 0c4a93e
assets/js/phoenix_live_view/hooks.js
@@ -218,7 +218,9 @@ Hooks.InfiniteScroll = {
218
scrollBefore = scrollNow;
219
return pendingOp();
220
}
221
- const rect = this.el.getBoundingClientRect();
+ const rect = this.scrollContainer
222
+ ? this.scrollContainer.firstElementChild.getBoundingClientRect()
223
+ : this.el.getBoundingClientRect();
224
const topEvent = this.el.getAttribute(
225
this.liveSocket.binding("viewport-top"),
226
);
0 commit comments