Changeset 688910a2 in vaadin
- Timestamp:
- 03/23/12 08:35:19 (14 months ago)
- Branches:
- 20b169873dbacf9eb7135a861bc5cf15177225ee, 34e6c60a5a746c0306c3a84ae8d6c21dfd84d878, 2772641acf8f84046e3ac42c8386b65e4f2346f2
- Children:
- 144072f8
- Parents:
- 14b4b323
- git-author:
- Leif Åstrand <leif@…> (03/23/12 08:35:11)
- git-committer:
- Leif Åstrand <leif@…> (03/23/12 08:35:19)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java
re43fe0d9 r688910a2 1151 1151 if (selectedItemIcon.isAttached()) { 1152 1152 panel.remove(selectedItemIcon); 1153 if (BrowserInfo.get().isIE8()) { 1154 forceReflow(); 1155 } 1153 1156 updateRootWidth(); 1154 1157 } 1155 1158 } else { 1159 selectedItemIcon.setUrl(iconUri); 1156 1160 panel.insert(selectedItemIcon, 0); 1157 selectedItemIcon.setUrl(iconUri); 1161 if (BrowserInfo.get().isIE8()) { 1162 forceReflow(); 1163 } 1158 1164 updateRootWidth(); 1159 1165 updateSelectedIconPosition(); 1160 1166 } 1167 } 1168 1169 private void forceReflow() { 1170 Style style = tb.getElement().getStyle(); 1171 1172 String oldZoom = style.getProperty("zoom"); 1173 style.setProperty("zoom", "1"); 1174 1175 // Forces reflow because style has changed 1176 tb.getOffsetWidth(); 1177 1178 // Restore old style 1179 style.setProperty("zoom", oldZoom); 1161 1180 } 1162 1181 … … 1606 1625 * locked 1607 1626 */ 1608 Style style = tb.getElement().getStyle(); 1609 if (!style.getWidth().endsWith("px")) { 1610 boolean isIE8 = BrowserInfo.get().isIE8(); 1611 if (isIE8) { 1612 // Must do something to make IE8 realize that it should 1613 // reflow the component when the offset width is read 1614 style.setProperty("zoom", "1"); 1615 } 1627 if (!tb.getElement().getStyle().getWidth().endsWith("px")) { 1616 1628 tb.setWidth((tb.getOffsetWidth() - selectedItemIcon 1617 1629 .getOffsetWidth()) + "px"); 1618 if (isIE8) {1619 // Restore old style property value1620 style.clearProperty("zoom");1621 }1622 1630 } 1623 1631 }
Note: See TracChangeset
for help on using the changeset viewer.
