diff --git a/dist/index.js b/dist/index.js index e5856c1..a5488c3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -848,7 +848,7 @@ // so we need retry in next event loop until it really at bottom setTimeout(function () { - if (_this.getOffset() + _this.getClientSize() < _this.getScrollSize()) { + if (_this.getOffset() + _this.getClientSize() + 1 < _this.getScrollSize()) { _this.scrollToBottom(); } }, 3); diff --git a/docs/index.js b/docs/index.js index 8729f0e..a37cb49 100644 --- a/docs/index.js +++ b/docs/index.js @@ -790,7 +790,7 @@ // so we need retry in next event loop until it really at bottom setTimeout(function () { - if (_this.getOffset() + _this.getClientSize() < _this.getScrollSize()) { + if (_this.getOffset() + _this.getClientSize() + 1 < _this.getScrollSize()) { _this.scrollToBottom(); } }, 3); diff --git a/src/index.js b/src/index.js index 607e65d..9b9ed37 100644 --- a/src/index.js +++ b/src/index.js @@ -180,7 +180,7 @@ const VirtualList = Vue.component('virtual-list', { // maybe list doesn't render and calculate to last range // so we need retry in next event loop until it really at bottom setTimeout(() => { - if (this.getOffset() + this.getClientSize() < this.getScrollSize()) { + if (this.getOffset() + this.getClientSize() + 1 < this.getScrollSize()) { this.scrollToBottom() } }, 3)