]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixes FF3 issue with relational widths
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Fri, 11 Jul 2008 08:27:03 +0000 (08:27 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Fri, 11 Jul 2008 08:27:03 +0000 (08:27 +0000)
svn changeset:5087/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/ITextField.java

index e09c44ea19fb43dc9206a13661ef10affee6699b..5438cc9f283d18b7ac739d687909e62cca3222f2 100644 (file)
@@ -192,11 +192,12 @@ public class ITextField extends TextBoxBase implements Paintable, Field,
         DOM.setElementAttribute(clone, "id", "");
         DOM.setStyleAttribute(clone, "visibility", "hidden");
         DOM.setStyleAttribute(clone, "position", "absolute");
-        DOM.setStyleAttribute(clone, "width", "0");
-        DOM.setStyleAttribute(clone, "height", "0");
+        // due FF3 bug set size to 10px and later subtract it from extra pixels
+        DOM.setStyleAttribute(clone, "width", "10px");
+        DOM.setStyleAttribute(clone, "height", "10px");
         DOM.appendChild(DOM.getParent(getElement()), clone);
-        extraHorizontalPixels = DOM.getElementPropertyInt(clone, "offsetWidth");
-        extraVerticalPixels = DOM.getElementPropertyInt(clone, "offsetHeight");
+        extraHorizontalPixels = DOM.getElementPropertyInt(clone, "offsetWidth") - 10;
+        extraVerticalPixels = DOM.getElementPropertyInt(clone, "offsetHeight") - 10;
         DOM.removeChild(DOM.getParent(getElement()), clone);
     }