PDA

View Full Version : [1.1b1] TextArea width incorrect



JorisA
10 Jun 2007, 2:02 AM
In Ext.form.Field.adjustWidth there is:

if(Ext.isGecko && tag == 'textarea'){
return w-6;
}

When I create a TextArea with width set to 150 for example, it is rendered with a width of 144 (so always 6 pixels short). Are you sure this is correct for Gecko engines? I'm using firefox 2.0.0.4.

jack.slocum
10 Jun 2007, 8:12 AM
Look in Firebug at offsetWidth (not the style), is it 150?

JorisA
10 Jun 2007, 12:39 PM
Ext.onReady(function(){

var testarea = new Ext.form.TextArea({
name: 'notes',
width: 150,
height: 50,
emptyText: 'Test box...'
});

testarea.applyTo('container');

});

Renders as in attachment.

Jonathan Feinberg
22 Jun 2007, 6:49 AM
I found this bug because I'm experiencing similar behavior. I can confirm that the offsetWidth DOM property is 6 pixels fewer than requested.

jack.slocum
22 Jun 2007, 8:22 AM
I replied in the other thread. Thanks for looking it up.