PDA

View Full Version : [FIXED-776][3.2 rc1]CompositeField First Field Width in IE7



squ3lch
24 Mar 2010, 5:34 AM
Ext version tested:


Ext 3.2 rc1



Adapter used:


ext
prototype



css used:


only default ext-all.css





Browser versions tested against:


IE7
FF3



Operating System:


WinXP Pro



Description:


In IE7, an "Invalid Argument" error is thrown when the first subfield in a CompositeField does not have a width specified. Firefox works correctly.



Test Case:



Ext.onReady(function(){

var f1 = new Ext.form.CompositeField({
labelWidth:50,
width:300,
fieldLabel:'f1',
hidden:true,
items:[
c1 = new Ext.form.TextField({
value:'test'
// ,width:75 // UNCOMMENT TO FIX
}),
t1 = new Ext.Button({
text:'Test'
})
]
});

var b1 = new Ext.Button({
text:'Show',
handler:function(){
f1.show();
p1.doLayout();
}
});

var p1 = new Ext.Panel({
id: 'card-0',
items:[
f1,
b1
]
});

var mainWindow = new Ext.Viewport({
layout:'absolute',
defaults:{x:10,y:5,anchor:"-10 -10",plain:true},
items:[
p1
]
});

mainWindow.doLayout();

});

Condor
24 Mar 2010, 5:56 AM
Yes, the error is incorrect behavior.

However, I would like to note that CompositeField uses a hbox layout, which requires either a 'width' or a 'flex' config option to be present in the items. If you specify neither the sizing will be unpredictable.

Jamie Avins
24 Mar 2010, 8:04 AM
Yes, the error is incorrect behavior.

However, I would like to note that CompositeField uses a hbox layout, which requires either a 'width' or a 'flex' config option to be present in the items. If you specify neither the sizing will be unpredictable.

This is no longer true in 3.2.x.

Jamie Avins
24 Mar 2010, 8:19 AM
[type]: fix
[module]: BoxLayout
[id]: #776
[desc]: Fixes #776. Check added to make sure positioning is not attempted if a position value is NaN.