Browse Source

[core] Fix scroll issue with foreachVisible when close to start

Johan Ahlen 9 years ago
parent
commit
8c0a08efae
1 changed files with 2 additions and 1 deletions
  1. 2 1
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

+ 2 - 1
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -3131,9 +3131,10 @@
 
       var lastScrollTop = -1;
       var onScroll = function () {
-        if (Math.abs(lastScrollTop - $container.scrollTop()) < incrementLimit * options.minHeight) {
+        if (startIndex > incrementLimit && Math.abs(lastScrollTop - $container.scrollTop()) < (incrementLimit * options.minHeight)) {
           return;
         }
+        lastScrollTop = $container.scrollTop();
         setStartAndEndFromScrollTop();
         clearTimeout(renderThrottle);
         if (Math.abs($parentFVOwnerElement.data('startIndex') - startIndex) > incrementLimit ||