summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-03-23 14:20:33 +0200
committerLeif Åstrand <leif@vaadin.com>2012-03-23 14:20:47 +0200
commitecdbb3d9a8898ca66a8fe6327279efb9ddc09cc7 (patch)
tree5a8dd63e37885a68ae4a024a96d66ff95481606c
parent06ec200ed72ef17037cf678b1ac407378293d7d6 (diff)
downloadvaadin-framework-ecdbb3d9a8898ca66a8fe6327279efb9ddc09cc7.tar.gz
vaadin-framework-ecdbb3d9a8898ca66a8fe6327279efb9ddc09cc7.zip
Another attempt with the icon styles for IE8 (#8313)
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java31
1 files changed, 9 insertions, 22 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java b/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java
index a7a12df840..82bbff9d85 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java
@@ -946,16 +946,13 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
selectedItemIcon.setStyleName("v-icon");
selectedItemIcon.addLoadHandler(new LoadHandler() {
public void onLoad(LoadEvent event) {
+ if (BrowserInfo.get().isIE8()) {
+ // IE8 needs some help to discover it should reposition the
+ // text field
+ forceReflow();
+ }
updateRootWidth();
updateSelectedIconPosition();
- /*
- * Workaround for an IE bug where the text is positioned below
- * the icon (#3991)
- */
- if (BrowserInfo.get().isIE()) {
- Util.setStyleTemporarily(tb.getElement(), "paddingLeft",
- "0");
- }
}
});
@@ -1151,32 +1148,22 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
if (selectedItemIcon.isAttached()) {
panel.remove(selectedItemIcon);
if (BrowserInfo.get().isIE8()) {
+ // IE8 needs some help to discover it should reposition the
+ // text field
forceReflow();
}
updateRootWidth();
}
} else {
- selectedItemIcon.setUrl(iconUri);
panel.insert(selectedItemIcon, 0);
- if (BrowserInfo.get().isIE8()) {
- forceReflow();
- }
+ selectedItemIcon.setUrl(iconUri);
updateRootWidth();
updateSelectedIconPosition();
}
}
private void forceReflow() {
- Style style = tb.getElement().getStyle();
-
- String oldZoom = style.getProperty("zoom");
- style.setProperty("zoom", "1");
-
- // Forces reflow because style has changed
- tb.getOffsetWidth();
-
- // Restore old style
- style.setProperty("zoom", oldZoom);
+ Util.setStyleTemporarily(tb.getElement(), "zoom", "1");
}
/**