From 1b7e40de9435f2584fe6c7f1b7f69cc448c16cc8 Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Fri, 4 Oct 2013 15:41:06 +0300 Subject: Only fetch rows if there are some (#11189) IE hacks cause calls to onScroll in situations where the cache row fetch logic is not working correctly (causes JS exception). This change has an optimization to pass this logic if there are no rows available and this way fixes the JS exception as well. Change-Id: I3425f3d75cad8b65e605638343b167abf7b48067 --- client/src/com/vaadin/client/ui/VScrollTable.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'client') diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java index 104cbbd5b9..0304acd590 100644 --- a/client/src/com/vaadin/client/ui/VScrollTable.java +++ b/client/src/com/vaadin/client/ui/VScrollTable.java @@ -6913,6 +6913,11 @@ public class VScrollTable extends FlowPanel implements HasWidgets, // fix footers horizontal scrolling tFoot.setHorizontalScrollPosition(scrollLeft); + if (totalRows == 0) { + // No rows, no need to fetch new rows + return; + } + firstRowInViewPort = calcFirstRowInViewPort(); if (firstRowInViewPort > totalRows - pageLength) { firstRowInViewPort = totalRows - pageLength; -- cgit v1.2.3