diff options
author | Artur Signell <artur@vaadin.com> | 2016-03-08 08:37:21 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-04-28 15:18:31 +0000 |
commit | 6b9d5161dab6a02601ab11903d55718c8e9239cf (patch) | |
tree | d8d048425e8db744be47d33584abb412608749d5 /client | |
parent | 4a2ab9017b96d97aa2edab33913c42c9b435fb8b (diff) | |
download | vaadin-framework-6b9d5161dab6a02601ab11903d55718c8e9239cf.tar.gz vaadin-framework-6b9d5161dab6a02601ab11903d55718c8e9239cf.zip |
Take transition into account for Window layout (#15192, #19525, #19415)
Change-Id: I33bbbac39bff97330b166e1c608b702fe6e527d7
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/ui/VWindow.java | 16 |
1 files changed, 16 insertions, 0 deletions
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 2d2d6ecee1..f037d74f91 100644 --- a/client/src/main/java/com/vaadin/client/ui/VWindow.java +++ b/client/src/main/java/com/vaadin/client/ui/VWindow.java @@ -220,6 +220,10 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, contentPanel.addKeyDownHandler(this); contentPanel.addFocusHandler(this); contentPanel.addBlurHandler(this); + if (!BrowserInfo.get().isIE8() && !BrowserInfo.get().isIE9()) { + addTransitionEndLayoutListener(getElement()); + } + } @Override @@ -1173,6 +1177,18 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, layoutManager.layoutNow(); } + private native void addTransitionEndLayoutListener(Element e) + /*-{ + var self = this; + e.addEventListener("transitionend", function(e) { + if (e.propertyName == "width" || e.propertyName == 'height') { + $entry(function() { + self.@com.vaadin.client.ui.VWindow::updateContentsSize()(); + })(); + } + }); + }-*/; + @Override public void setWidth(String width) { // Override PopupPanel which sets the width to the contents |