From: Jarno Rantala Date: Fri, 17 Jan 2014 15:28:08 +0000 (+0200) Subject: Prevent setting firstRowInViewPort to negative value (#13008) X-Git-Tag: 7.1.11~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=16e079fcaed8cf531187475527ae52e7cf2d2504;p=vaadin-framework.git Prevent setting firstRowInViewPort to negative value (#13008) This should fix MultiSelectWithRemovedRow test in IE. Change-Id: I54f4ba1cc5c1efeea1582cc0314cfb9a4a859279 --- diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java index 3c574f8f92..e800e7fe79 100644 --- a/client/src/com/vaadin/client/ui/VScrollTable.java +++ b/client/src/com/vaadin/client/ui/VScrollTable.java @@ -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