summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorJuuso Valli <juuso@vaadin.com>2014-04-29 12:48:07 +0300
committerVaadin Code Review <review@vaadin.com>2014-05-14 07:34:28 +0000
commitda11bda0a3583922ad1f338f4d12c0aa821ad796 (patch)
treeeb0b0d219e2540affbc4bb9a70eeecd78167349b /client
parent5a1ffa814230c3da751ab5953da0fb0ae75c4c80 (diff)
downloadvaadin-framework-da11bda0a3583922ad1f338f4d12c0aa821ad796.tar.gz
vaadin-framework-da11bda0a3583922ad1f338f4d12c0aa821ad796.zip
Fix table scrolling up on select (#10106)
Change-Id: I4d13bee983817ce299d1f7e52ddd6cdc725fee6f
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java
index 449665a72e..918b7fbdaa 100644
--- a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java
+++ b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java
@@ -17,6 +17,8 @@ package com.vaadin.client.ui.orderedlayout;
import java.util.List;
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.user.client.ui.Widget;
@@ -493,7 +495,15 @@ public abstract class AbstractOrderedLayoutConnector extends
updateLayoutHeight();
if (needsExpand()) {
getWidget().updateExpandedSizes();
- getWidget().updateExpandCompensation();
+ // updateExpandedSizes causes fixed size components to temporarily
+ // lose their size. updateExpandCompensation must be delayed until
+ // the browser has a chance to measure them.
+ Scheduler.get().scheduleFinally(new ScheduledCommand() {
+ @Override
+ public void execute() {
+ getWidget().updateExpandCompensation();
+ }
+ });
} else {
getWidget().clearExpand();
}