aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/main/java/com/vaadin/client/widgets/Escalator.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/main/java/com/vaadin/client/widgets/Escalator.java b/client/src/main/java/com/vaadin/client/widgets/Escalator.java
index ff76a66f96..cc207c10c0 100644
--- a/client/src/main/java/com/vaadin/client/widgets/Escalator.java
+++ b/client/src/main/java/com/vaadin/client/widgets/Escalator.java
@@ -2907,10 +2907,14 @@ public class Escalator extends Widget
*/
scroller.recalculateScrollbarsForVirtualViewport();
+ double spacerHeightsSumUntilIndex = spacerContainer
+ .getSpacerHeightsSumUntilIndex(index);
final boolean addedRowsAboveCurrentViewport = index
- * getDefaultRowHeight() < getScrollTop();
+ * getDefaultRowHeight()
+ + spacerHeightsSumUntilIndex < getScrollTop();
final boolean addedRowsBelowCurrentViewport = index
- * getDefaultRowHeight() > getScrollTop()
+ * getDefaultRowHeight()
+ + spacerHeightsSumUntilIndex > getScrollTop()
+ getHeightOfSection();
if (addedRowsAboveCurrentViewport) {