]> source.dussan.org Git - vaadin-framework.git/commitdiff
Prevent setting firstRowInViewPort to negative value (#13008)
authorJarno Rantala <jarno.rantala@vaadin.com>
Fri, 17 Jan 2014 15:28:08 +0000 (17:28 +0200)
committerVaadin Code Review <review@vaadin.com>
Fri, 31 Jan 2014 11:17:54 +0000 (11:17 +0000)
This should fix MultiSelectWithRemovedRow test in IE.

Change-Id: I54f4ba1cc5c1efeea1582cc0314cfb9a4a859279

client/src/com/vaadin/client/ui/VScrollTable.java

index 3c574f8f9206f40fa507ad9ea84fbb7c79965038..e800e7fe79cb7b90ad01542ebb64a5454e5273eb 100644 (file)
@@ -6965,8 +6965,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
         }
 
         firstRowInViewPort = calcFirstRowInViewPort();
-        if (firstRowInViewPort > totalRows - pageLength) {
-            firstRowInViewPort = totalRows - pageLength;
+        int maxFirstRow = totalRows - pageLength;
+        if (firstRowInViewPort > maxFirstRow && maxFirstRow >= 0) {
+            firstRowInViewPort = maxFirstRow;
         }
 
         int postLimit = (int) (firstRowInViewPort + (pageLength - 1) + pageLength