From 16e079fcaed8cf531187475527ae52e7cf2d2504 Mon Sep 17 00:00:00 2001 From: Jarno Rantala Date: Fri, 17 Jan 2014 17:28:08 +0200 Subject: [PATCH] Prevent setting firstRowInViewPort to negative value (#13008) This should fix MultiSelectWithRemovedRow test in IE. Change-Id: I54f4ba1cc5c1efeea1582cc0314cfb9a4a859279 --- client/src/com/vaadin/client/ui/VScrollTable.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.5