aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuuso Valli <juuso@vaadin.com>2014-04-29 12:48:07 +0300
committerJuuso Valli <juuso@vaadin.com>2014-06-04 13:29:47 +0300
commit5d584c858b26266ef17d2bf01d397d1e4a296488 (patch)
tree2fe3997e78c8b882a3f6dd51ee2b4c61de8cf868
parent44f672bf859ccab742b4ae5dd502395090e7ca05 (diff)
downloadvaadin-framework-7.2.2.tar.gz
vaadin-framework-7.2.2.zip
Fix table scrolling up on select (#10106)7.2.2
Change-Id: I4d13bee983817ce299d1f7e52ddd6cdc725fee6f
-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 6be92d220b..0c09ae49c6 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;
@@ -505,7 +507,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();
}