diff --git a/dist/InfiniteScroll.js b/dist/InfiniteScroll.js index 8decb7e..f78bec7 100644 --- a/dist/InfiniteScroll.js +++ b/dist/InfiniteScroll.js @@ -107,7 +107,7 @@ var InfiniteScroll = function (_Component) { } else if (this.props.isReverse) { offset = el.parentNode.scrollTop; } else { - offset = el.scrollHeight - el.parentNode.scrollTop - el.parentNode.clientHeight; + offset = el.parentNode.scrollHeight - el.parentNode.clientHeight - el.parentNode.scrollTop; } if (offset < Number(this.props.threshold)) { diff --git a/src/InfiniteScroll.js b/src/InfiniteScroll.js index 1d6be43..b81e6d2 100644 --- a/src/InfiniteScroll.js +++ b/src/InfiniteScroll.js @@ -105,7 +105,7 @@ export default class InfiniteScroll extends Component { } else if (this.props.isReverse) { offset = el.parentNode.scrollTop; } else { - offset = el.scrollHeight - el.parentNode.scrollTop - el.parentNode.clientHeight; + offset = el.parentNode.scrollHeight - el.parentNode.clientHeight - el.parentNode.scrollTop; } if (offset < Number(this.props.threshold)) {