From: Matti Tahvonen Date: Fri, 11 Jul 2008 08:27:03 +0000 (+0000) Subject: Fixes FF3 issue with relational widths X-Git-Tag: 6.7.0.beta1~4440 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=81dc52912ff82885050581b281945606867d3a2f;p=vaadin-framework.git Fixes FF3 issue with relational widths svn changeset:5087/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/ITextField.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/ITextField.java index e09c44ea19..5438cc9f28 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/ITextField.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/ITextField.java @@ -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); }