Changeset 5087

Show
Ignore:
Timestamp:
07/11/08 08:27:03 (6 months ago)
Author:
matti.tahvonen@…
Message:

Fixes FF3 issue with relational widths

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/com/itmill/toolkit/terminal/gwt/client/ui/ITextField.java

    r5077 r5087  
    193193        DOM.setStyleAttribute(clone, "visibility", "hidden"); 
    194194        DOM.setStyleAttribute(clone, "position", "absolute"); 
    195         DOM.setStyleAttribute(clone, "width", "0"); 
    196         DOM.setStyleAttribute(clone, "height", "0"); 
     195        // due FF3 bug set size to 10px and later subtract it from extra pixels 
     196        DOM.setStyleAttribute(clone, "width", "10px"); 
     197        DOM.setStyleAttribute(clone, "height", "10px"); 
    197198        DOM.appendChild(DOM.getParent(getElement()), clone); 
    198         extraHorizontalPixels = DOM.getElementPropertyInt(clone, "offsetWidth"); 
    199         extraVerticalPixels = DOM.getElementPropertyInt(clone, "offsetHeight"); 
     199        extraHorizontalPixels = DOM.getElementPropertyInt(clone, "offsetWidth") - 10; 
     200        extraVerticalPixels = DOM.getElementPropertyInt(clone, "offsetHeight") - 10; 
    200201        DOM.removeChild(DOM.getParent(getElement()), clone); 
    201202    }