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;
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) {
+ Util.forceIE8Redraw(getCaptionElement());
+ }
+ };
// Caption is placed after component unless there is some part which
// moves it above.
lm.addElementResizeListener(getSpacingElement(),
spacingResizeListener);
}
+
+ if (BrowserInfo.get().isIE8()) {
+ lm.addElementResizeListener(getWidget().getElement(),
+ ie8CaptionElementResizeUpdateListener);
+ }
}
}
lm.removeElementResizeListener(getSpacingElement(),
spacingResizeListener);
}
+
+ if (BrowserInfo.get().isIE8()) {
+ lm.removeElementResizeListener(getWidget().getElement(),
+ ie8CaptionElementResizeUpdateListener);
+ }
}
}