summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-07-17 13:13:07 +0300
committerTeemu Suo-Anttila <teemusa@vaadin.com>2015-07-22 11:34:03 +0300
commit7f9a08721b62e06ecd57426a00f63c4abc86b8ff (patch)
tree0bbf838462e4dd34d280e921f5433231078e0a06
parentf12fa203340b2b281035d6096682970a788deef4 (diff)
downloadvaadin-framework-7f9a08721b62e06ecd57426a00f63c4abc86b8ff.tar.gz
vaadin-framework-7f9a08721b62e06ecd57426a00f63c4abc86b8ff.zip
Fix IE8 centered window initial placement (#18498)
Change-Id: I0bb5160adfab11bdba695c4e7187d8a3b3f955cd
-rw-r--r--client/src/com/vaadin/client/ui/VOverlay.java14
-rw-r--r--client/src/com/vaadin/client/ui/window/WindowConnector.java10
2 files changed, 10 insertions, 14 deletions
diff --git a/client/src/com/vaadin/client/ui/VOverlay.java b/client/src/com/vaadin/client/ui/VOverlay.java
index e823e8ee80..3649afc74f 100644
--- a/client/src/com/vaadin/client/ui/VOverlay.java
+++ b/client/src/com/vaadin/client/ui/VOverlay.java
@@ -22,8 +22,6 @@ import java.util.logging.Logger;
import com.google.gwt.animation.client.Animation;
import com.google.gwt.aria.client.Roles;
import com.google.gwt.core.client.JavaScriptObject;
-import com.google.gwt.core.client.Scheduler;
-import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.IFrameElement;
@@ -473,17 +471,7 @@ public class VOverlay extends PopupPanel implements CloseHandler<PopupPanel> {
if (isAnimationEnabled()) {
new ResizeAnimation().run(POPUP_PANEL_ANIMATION_DURATION);
} else {
- if (BrowserInfo.get().isIE8()) {
- Scheduler.get().scheduleFinally(new ScheduledCommand() {
-
- @Override
- public void execute() {
- positionOrSizeUpdated(1.0);
- }
- });
- } else {
- positionOrSizeUpdated(1.0);
- }
+ positionOrSizeUpdated(1.0);
}
current = null;
}
diff --git a/client/src/com/vaadin/client/ui/window/WindowConnector.java b/client/src/com/vaadin/client/ui/window/WindowConnector.java
index 9b710981d8..8c23f712ad 100644
--- a/client/src/com/vaadin/client/ui/window/WindowConnector.java
+++ b/client/src/com/vaadin/client/ui/window/WindowConnector.java
@@ -17,6 +17,8 @@ package com.vaadin.client.ui.window;
import java.util.logging.Logger;
+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.NativeEvent;
import com.google.gwt.dom.client.Node;
@@ -407,7 +409,13 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector
window.centered = state.centered;
// Ensure centering before setting visible (#16486)
if (window.centered && getState().windowMode != WindowMode.MAXIMIZED) {
- window.center();
+ Scheduler.get().scheduleFinally(new ScheduledCommand() {
+
+ @Override
+ public void execute() {
+ getWidget().center();
+ }
+ });
}
window.setVisible(true);