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 b8e8e60 commit 9b77f8bCopy full SHA for 9b77f8b
dist/InfiniteScroll.js
@@ -102,7 +102,8 @@ var InfiniteScroll = function (_Component) {
102
if (this.props.isReverse) offset = parentNode.scrollTop;else offset = el.scrollHeight - parentNode.scrollTop - parentNode.clientHeight;
103
}
104
105
- if (offset < Number(this.props.threshold)) {
+ // Here we make sure the element is visible as well as checking the offset
106
+ if (offset < Number(this.props.threshold) && el.offsetParent !== null) {
107
this.detachScrollListener();
108
// Call loadMore after detachScrollListener to allow for non-async loadMore functions
109
if (typeof this.props.loadMore == 'function') {
0 commit comments