diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-08-14 13:21:53 +0300 |
---|---|---|
committer | patrik <patrik@vaadin.com> | 2015-08-14 14:04:39 +0300 |
commit | 322d777d2eaece892a16d4f486f5108740e9226a (patch) | |
tree | e7dec56170ca79da701e5adbb12a230251668537 | |
parent | fca2bd0e8a256fdb2115db0b89fd6cc421234653 (diff) | |
download | vaadin-framework-322d777d2eaece892a16d4f486f5108740e9226a.tar.gz vaadin-framework-322d777d2eaece892a16d4f486f5108740e9226a.zip |
Prevent Escalator scrollbars oscillation in HeightByRows mode (#18596)
Change-Id: Ie44ee231d83491af8704f989300a0b8cd9888374
-rw-r--r-- | client/src/com/vaadin/client/widgets/Escalator.java | 17 |
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; + } + }); } }); |