summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
index 7dfdf2de8a..17bc4db41b 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
@@ -1259,7 +1259,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
.getIntVariable("firstvisible") : 0;
firstVisibleOnLastPage = uidl.hasVariable("firstvisibleonlastpage") ? uidl
.getIntVariable("firstvisibleonlastpage") : -1;
- if (firstvisible != lastRequestedFirstvisible) {
+ if (firstvisible != lastRequestedFirstvisible && scrollBody != null) {
// Only scroll if the first visible changes from the server side.
// Else we might unintentionally scroll even when the scroll
// position has not changed.
@@ -1269,6 +1269,7 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
private void scrollToFirstVisible() {
if (firstvisible > 0) {
+ firstRowInViewPort = firstvisible;
if (firstVisibleOnLastPage > -1) {
scrollBodyPanel
.setScrollPosition(measureRowHeightOffset(firstVisibleOnLastPage));