aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java
index 3e8c73ad28..000ea4d22f 100644
--- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java
+++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java
@@ -877,11 +877,20 @@ public class IFilterSelect extends Composite implements Paintable, Field,
* div so the popupopener won't wrap to the next line and also so
* the size of the combobox won't change over time.
*/
- int w = Util.getRequiredWidth(tb)
- + Util.getRequiredWidth(popupOpener);
+ int tbWidth = Util.getRequiredWidth(tb);
+ int openerWidth = Util.getRequiredWidth(popupOpener);
+
+ int w = tbWidth + openerWidth;
if (suggestionPopupMinWidth > w) {
setTextboxWidth(suggestionPopupMinWidth);
w = suggestionPopupMinWidth;
+ } else {
+ /*
+ * Firefox3 has its own way of doing rendering so we need to
+ * specify the width for the TextField to make sure it actually
+ * is rendered as wide as FF3 says it is
+ */
+ tb.setWidth((tbWidth - getTextboxPadding()) + "px");
}
super.setWidth(w + "px");
@@ -911,7 +920,7 @@ public class IFilterSelect extends Composite implements Paintable, Field,
private void setTextboxWidth(int componentWidth) {
int padding = getTextboxPadding();
- int popupOpenerWidth = popupOpener.getOffsetWidth();
+ int popupOpenerWidth = Util.getRequiredWidth(popupOpener);
int textboxWidth = componentWidth - padding - popupOpenerWidth;
if (textboxWidth < 0) {
textboxWidth = 0;