瀏覽代碼

[core] Fix issue with negative index after scroll

Johan Ahlen 9 年之前
父節點
當前提交
e7f17e2ee3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

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

@@ -3139,7 +3139,7 @@
         for (var i = 0; i < lastKnownHeights.length; i++) {
           position -= lastKnownHeights[i];
           if (position <= 0) {
-            startIndex = Math.min(allEntries.length - elementIncrement, Math.max(i - elementIncrement, 0));
+            startIndex = Math.max(i - elementIncrement, 0);
             endIndex = Math.min(allEntries.length - 1, i + elementIncrement + visibleEntryCount);
             break;
           }