summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorJohn Alhroos <john.ahlroos@itmill.com>2010-03-02 10:56:42 +0000
committerJohn Alhroos <john.ahlroos@itmill.com>2010-03-02 10:56:42 +0000
commit9afeeff7b2b1f3a21909a69bfb201e54b9a3da6c (patch)
treecc5f5d64590757ce3599b365cca7e6b322951327 /src/com
parentde2baaa5c31d8a46ce4787c56fd5a7ba743bb923 (diff)
downloadvaadin-framework-9afeeff7b2b1f3a21909a69bfb201e54b9a3da6c.tar.gz
vaadin-framework-9afeeff7b2b1f3a21909a69bfb201e54b9a3da6c.zip
Merged fix for #3991 from 6.2 to 6.3.
svn changeset:11585/svn branch:6.3
Diffstat (limited to 'src/com')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java19
1 files changed, 18 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 2dcf7562ae..669b5b90ea 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java
@@ -631,6 +631,23 @@ public class VFilterSelect extends Composite implements Paintable, Field,
public void onLoad(LoadEvent event) {
updateRootWidth();
updateSelectedIconPosition();
+
+ /*
+ * We need to re-calculate the widths in IE at load time to
+ * ensure that the text is not placed behind the icon. #3991
+ */
+ if (BrowserInfo.get().isIE()) {
+ int tbWidth = Util.getRequiredWidth(tb);
+ int openerWidth = Util.getRequiredWidth(popupOpener);
+ int iconWidth = selectedItemIcon.isAttached() ? Util
+ .measureMarginLeft(tb.getElement())
+ - Util.measureMarginLeft(selectedItemIcon
+ .getElement()) : 0;
+
+ int w = tbWidth + openerWidth + iconWidth;
+ tb.setWidth((tbWidth - getTextboxPadding()) + "px");
+ setTextboxWidth(w);
+ }
}
});
@@ -883,8 +900,8 @@ public class VFilterSelect extends Composite implements Paintable, Field,
panel.remove(selectedItemIcon);
updateRootWidth();
} else {
- selectedItemIcon.setUrl(iconUri);
panel.insert(selectedItemIcon, 0);
+ selectedItemIcon.setUrl(iconUri);
updateRootWidth();
updateSelectedIconPosition();
}