PDA

View Full Version : [UNKNOWN][3.1] Page content disappears in FF after upgrade to 3.1



aedos
30 Dec 2009, 11:10 AM
This is a blocker for us. The content of many of pages disappears in FF, after upgrade from 3.0 to 3.1. Works fine in IE.

I can't yet pinpoint the problem, but it seems related to multi-column forms (form layout under table layout) plus a few other minor factors.

Here's a much simplified page that can reproduce the problem. It looks fine in IE, but none of the textfield shows up in FF:


<script type="text/javascript">
Ext.onReady(function() {
var twoCols = {
layout: 'table',
layoutConfig: {'columns': 2},
defaults: {layout:'form', border:false, defaultType:'textfield'},
items: [
{
items:[
{ fieldLabel: 'First Name', value: 'John' },
{ fieldLabel: 'Last Name', value: 'Smith' }
]

},
{
items: { fieldLabel: 'Info' }
}
]
}

new Ext.Viewport({
layout: 'anchor',
items:[
twoCols,
{ html:'blah' }
]
});
})
</script>

elishnevsky
30 Dec 2009, 11:32 AM
Try setting forceLayout:true of your twoCols literal.

aedos
30 Dec 2009, 11:43 AM
Thanks, Eugene! forceLayout:true is a good workaround. (However, because this form is not under a hidden or collapsed container, this flag should not be needed. So still a bug.)

I also found another workaround, to just remove border:false from the form config. (But why??)

Could someone explain the FF behavior change in 3.1, so we can understand the impact of this change (or bug)? Thanks!

Condor
30 Dec 2009, 1:42 PM
This is a known bug in the Ext 3.1 TableLayout (see here (http://www.extjs.com/forum/showthread.php?p=420133#post420133)).

ps. You should add an anchor to the twoCols panel to set the width, e.g.

anchor: '100%'

aedos
30 Dec 2009, 2:00 PM
Thx Condor.

The fix in Container.canLayout() does the trick. Looking forward to the official fix.

Right, anchor:'100%' got lost when I tried to simply the test case.