summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-08-14 13:21:53 +0300
committerVaadin Code Review <review@vaadin.com>2015-08-14 10:59:11 +0000
commit86e0fddbdc1dc849d596f526bb17efdfa8d67019 (patch)
tree6bb86e41e01d93c3ea74a40c68158a4d51ff18e7 /client
parentcaea8f39e7e39123992982924d0a2c703dc5979e (diff)
downloadvaadin-framework-86e0fddbdc1dc849d596f526bb17efdfa8d67019.tar.gz
vaadin-framework-86e0fddbdc1dc849d596f526bb17efdfa8d67019.zip
Prevent Escalator scrollbars oscillation in HeightByRows mode (#18596)
Change-Id: Id7e72fbd31277b7c93055c8aa9309d73c86795d6
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/widgets/Escalator.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/widgets/Escalator.java b/client/src/com/vaadin/client/widgets/Escalator.java
index 99f13378d4..5b3d4e1b70 100644
--- a/client/src/com/vaadin/client/widgets/Escalator.java
+++ b/client/src/com/vaadin/client/widgets/Escalator.java
@@ -5641,14 +5641,29 @@ public class Escalator extends Widget implements RequiresResize,
horizontalScrollbar.setScrollbarThickness(scrollbarThickness);
horizontalScrollbar
.addVisibilityHandler(new ScrollbarBundle.VisibilityHandler() {
+
+ private boolean queued = false;
+
@Override
public void visibilityChanged(
ScrollbarBundle.VisibilityChangeEvent event) {
+ if (queued) {
+ return;
+ }
+ queued = true;
+
/*
* We either lost or gained a scrollbar. In any case, we
* need to change the height, if it's defined by rows.
*/
- applyHeightByRows();
+ Scheduler.get().scheduleFinally(new ScheduledCommand() {
+
+ @Override
+ public void execute() {
+ applyHeightByRows();
+ queued = false;
+ }
+ });
}
});