From 33f7b2d45a8f18ca6aaa64c7e74d1664eda74a48 Mon Sep 17 00:00:00 2001 From: Daniel Herrero Date: Mon, 30 Apr 2018 14:00:09 +0200 Subject: [PATCH] renamed action --- client/core/src/components/auto-paging/auto-paging.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/core/src/components/auto-paging/auto-paging.js b/client/core/src/components/auto-paging/auto-paging.js index 5b8c85ce93..892df0f1a4 100644 --- a/client/core/src/components/auto-paging/auto-paging.js +++ b/client/core/src/components/auto-paging/auto-paging.js @@ -43,7 +43,8 @@ class AutoPaging { checkPosition() { let element = this.$element[0].querySelector('vn-spinner'); let position = element.getBoundingClientRect(); - if (this.currentPage < this.numPages && position.y < document.body.offsetHeight + 150 && !this.waitingNewPage) { + let isVisible = position.y < document.body.offsetHeight + 150; + if (this.currentPage < this.numPages && isVisible && !this.waitingNewPage) { this.loadNewPage(); } }