diff options
author | Henri Sara <hesara@vaadin.com> | 2013-04-29 14:19:02 +0300 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2013-04-29 14:19:02 +0300 |
commit | 747c99eea95b7dba0b9ea8023a01e4e97222194d (patch) | |
tree | 1bc49591d74fbda909c548345d91389be3042744 /client | |
parent | 97e5714b0aa99e39fd1c6ec7089631ea3a6f9fcb (diff) | |
parent | d214efa39a011002eb88e683676508e438842fe4 (diff) | |
download | vaadin-framework-747c99eea95b7dba0b9ea8023a01e4e97222194d.tar.gz vaadin-framework-747c99eea95b7dba0b9ea8023a01e4e97222194d.zip |
Merge commit 'd214efa39a011002eb88e683676508e438842fe4'
Conflicts:
client/src/com/vaadin/client/ui/orderedlayout/Slot.java
Change-Id: I2fb5d1ac4b5c10a1fe5b1a6f976c1f59283b9169
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/orderedlayout/Slot.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/orderedlayout/Slot.java b/client/src/com/vaadin/client/ui/orderedlayout/Slot.java index cf19da3496..00ff5bbc5a 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/Slot.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/Slot.java @@ -25,8 +25,11 @@ import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.UIObject; import com.google.gwt.user.client.ui.Widget; +import com.vaadin.client.BrowserInfo; import com.vaadin.client.LayoutManager; import com.vaadin.client.StyleConstants; +import com.vaadin.client.Util; +import com.vaadin.client.ui.layout.ElementResizeEvent; import com.vaadin.client.ui.layout.ElementResizeListener; import com.vaadin.shared.ui.AlignmentInfo; @@ -93,6 +96,22 @@ public final class Slot extends SimplePanel { private ElementResizeListener spacingResizeListener; + /* + * This listener is applied only in IE8 to workaround browser issue where + * IE8 forgets to update the error indicator position when the slot gets + * resized by widget resizing itself. #11693 + */ + private ElementResizeListener ie8CaptionElementResizeUpdateListener = new ElementResizeListener() { + + @Override + public void onElementResize(ElementResizeEvent e) { + Element caption = getCaptionElement(); + if (caption != null) { + Util.forceIE8Redraw(caption); + } + } + }; + // Caption is placed after component unless there is some part which // moves it above. private CaptionPosition captionPosition = CaptionPosition.RIGHT; @@ -161,6 +180,11 @@ public final class Slot extends SimplePanel { lm.addElementResizeListener(getSpacingElement(), spacingResizeListener); } + + if (BrowserInfo.get().isIE8()) { + lm.addElementResizeListener(getWidget().getElement(), + ie8CaptionElementResizeUpdateListener); + } } } @@ -182,6 +206,11 @@ public final class Slot extends SimplePanel { lm.removeElementResizeListener(getSpacingElement(), spacingResizeListener); } + + if (BrowserInfo.get().isIE8()) { + lm.removeElementResizeListener(getWidget().getElement(), + ie8CaptionElementResizeUpdateListener); + } } } |