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.
2 parents 7af8b32 + dba7ece commit f4623afCopy full SHA for f4623af
src/components/InfiniteLoading.vue
@@ -50,11 +50,14 @@
50
if (dir === 'top') {
51
distance = scrollTop;
52
} else {
53
+ const elmBoundingClientRect = elm.getBoundingClientRect();
54
const scrollElmHeight = elm === window ?
55
window.innerHeight :
- elm.getBoundingClientRect().height;
56
+ elmBoundingClientRect.height;
57
+ const elOffsetTopFromScrollElm = this.$el.getBoundingClientRect().top -
58
+ elmBoundingClientRect.top;
59
- distance = this.$el.offsetTop - scrollTop - scrollElmHeight - (elm.offsetTop || 0);
60
+ distance = elOffsetTopFromScrollElm - scrollTop - scrollElmHeight - (elm.offsetTop || 0);
61
}
62
return distance;
63
0 commit comments