diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-03-21 15:32:16 +0200 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-03-21 15:32:32 +0200 |
commit | e43fe0d96f6bd1b4083dd60ff5e6a490da6c1d4f (patch) | |
tree | c3b6f138d08dadb3e00dd917ae1695ce66e86d5f /src | |
parent | a4798ac19e27acb4af051edfdaddafd6f704f151 (diff) | |
download | vaadin-framework-e43fe0d96f6bd1b4083dd60ff5e6a490da6c1d4f.tar.gz vaadin-framework-e43fe0d96f6bd1b4083dd60ff5e6a490da6c1d4f.zip |
Force reflow in IE8 to detect icon style (#8313)
Diffstat (limited to 'src')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java b/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java index 7fdcaff47c..a3c273260e 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java @@ -1605,9 +1605,20 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, * Lock the textbox width to its current value if it's not already * locked */ - if (!tb.getElement().getStyle().getWidth().endsWith("px")) { + Style style = tb.getElement().getStyle(); + if (!style.getWidth().endsWith("px")) { + boolean isIE8 = BrowserInfo.get().isIE8(); + if (isIE8) { + // Must do something to make IE8 realize that it should + // reflow the component when the offset width is read + style.setProperty("zoom", "1"); + } tb.setWidth((tb.getOffsetWidth() - selectedItemIcon .getOffsetWidth()) + "px"); + if (isIE8) { + // Restore old style property value + style.clearProperty("zoom"); + } } } } |