summaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2018-05-03 12:22:36 +0300
committerTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2018-05-03 12:22:35 +0300
commit1d6002baf96ec0cc4cb6aff7336af8fa94f57c63 (patch)
tree925fccb5ddb4e9eca097923c903890869232a96f /client/src
parent4b9e102a2e03558df224cec73c21077eb7368ad1 (diff)
downloadvaadin-framework-1d6002baf96ec0cc4cb6aff7336af8fa94f57c63.tar.gz
vaadin-framework-1d6002baf96ec0cc4cb6aff7336af8fa94f57c63.zip
Fix Window layout when resizing (#10830)
Fixes #10652
Diffstat (limited to 'client/src')
-rw-r--r--client/src/main/java/com/vaadin/client/WidgetUtil.java2
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VWindow.java10
2 files changed, 11 insertions, 1 deletions
diff --git a/client/src/main/java/com/vaadin/client/WidgetUtil.java b/client/src/main/java/com/vaadin/client/WidgetUtil.java
index 7a05241dca..6906f5fa5e 100644
--- a/client/src/main/java/com/vaadin/client/WidgetUtil.java
+++ b/client/src/main/java/com/vaadin/client/WidgetUtil.java
@@ -488,7 +488,7 @@ public class WidgetUtil {
final int scrollleft = elem.getScrollLeft();
elem.getStyle().setProperty("overflow", "hidden");
- Scheduler.get().scheduleDeferred(() -> {
+ Scheduler.get().scheduleFinally(() -> {
// Dough, Safari scroll auto means actually just a moped
elem.getStyle().setProperty("overflow", originalOverflow);
if (!originalOverflowX.isEmpty()) {
diff --git a/client/src/main/java/com/vaadin/client/ui/VWindow.java b/client/src/main/java/com/vaadin/client/ui/VWindow.java
index 0e78fc02b3..c0b3f69289 100644
--- a/client/src/main/java/com/vaadin/client/ui/VWindow.java
+++ b/client/src/main/java/com/vaadin/client/ui/VWindow.java
@@ -54,6 +54,7 @@ import com.vaadin.client.BrowserInfo;
import com.vaadin.client.ComponentConnector;
import com.vaadin.client.ConnectorMap;
import com.vaadin.client.Focusable;
+import com.vaadin.client.HasComponentsConnector;
import com.vaadin.client.LayoutManager;
import com.vaadin.client.WidgetUtil;
import com.vaadin.client.debug.internal.VDebugWindow;
@@ -633,6 +634,15 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
*/
WidgetUtil
.runWebkitOverflowAutoFix(contents.getFirstChildElement());
+ Scheduler.get().scheduleFinally(() -> {
+ List<ComponentConnector> childComponents = ((HasComponentsConnector) ConnectorMap
+ .get(client).getConnector(this)).getChildComponents();
+ if (!childComponents.isEmpty()) {
+ LayoutManager layoutManager = getLayoutManager();
+ layoutManager.setNeedsMeasure(childComponents.get(0));
+ layoutManager.layoutNow();
+ }
+ });
}
}