aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2008-12-11 12:37:48 +0000
committerArtur Signell <artur.signell@itmill.com>2008-12-11 12:37:48 +0000
commit85666f0f7a160e00652a3e8d57f73fa17f369d47 (patch)
tree96c833f70f0604cedb456149cc1ee690271aabfa /src
parentdb6521080c3a88e680ccfaea3f663eda87a0c508 (diff)
downloadvaadin-framework-85666f0f7a160e00652a3e8d57f73fa17f369d47.tar.gz
vaadin-framework-85666f0f7a160e00652a3e8d57f73fa17f369d47.zip
Fix for #2315 - FF3 ComboBox rendering issue
svn changeset:6170/svn branch:trunk
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;