PDA

View Full Version : [DUP][3.??] Error when closing window with tabs



Coen
14 Jan 2010, 3:11 AM
After an hour of tracing this bug down to it's core, I came up with the following code to reproduce it. I am using Ext 3.1.0.



Ext.onReady(function() {

var someForm = new Ext.FormPanel({
buttons: [
new Ext.Button({
text: "Some button",
handler: function() { }
})
]
});

var tab1 = new Ext.Panel({
title: "Some tab",
layout: "fit",
items: [
someForm
]
});

var tab2 = new Ext.Panel({
title: "Some tab II"
});

var someTabPanel = new Ext.TabPanel({
activeTab: 0,
items: [
tab1,
tab2
]
});

var someWindow = new Ext.Window({
width: 300,
height: 300,
items: [
someTabPanel
]
});

someWindow.show();

});
This opens a window with 2 tabs, with the first one opened by default. Switch to the second tab and close the window, the following error should occur.



this.dom is undefined ext-all-debug.js (line 2813)
return noBoxAdjust[(this.dom.tag..."").toLowerCase()] || Ext.isBorderBox;
The error disappears when removing the buttons property of someForm, supplying autoHeight = true to the config of someForm, or removing the layout of tab1. Probably others but I only tested those I thought were relevant to the issue.

Hope I didn't miss anything silly!

Condor
14 Jan 2010, 4:10 AM
Isn't this (http://www.extjs.com/forum/showthread.php?t=89316) the same bug?

Coen
14 Jan 2010, 4:39 AM
You are right, I hadn't linked it as such.

Thank you!

jai1485
4 Aug 2010, 11:32 PM
When i open the form at the first time, form panel opens perfectly and after closing the first time using the tab close. Form not loading at the second time

Code is below:

I have created a menu.js and using this


xtype: 'menuitem',
text: 'Sample',
listeners:{
click: function(){
Ext.getCmp('desktop-tabs').add(sampleUI.add);
Ext.getCmp('sample_form').show();
}
}


I have created a sampleform.js and using this
Ext.onReady(function() {
sampleUI.add = new Ext.FormPanel({
labelAlign : 'top',
closable : true,
closeAction : 'hide',
frame : true,
layout : 'table',
id : 'sample_form',
autoDestory : false,
title : 'Add Course',
formHandler : true,
bodyStyle : 'padding:5px 5px 0',
autoScroll : true,

},
items: [
{
layout:'column',
width:800,
frame:true,
items:[
{
columnWidth:1,
layout: 'form',
items: [
{
xtype:'textfield',
fieldLabel: 'Course Name',
name: 'name',
id:'coursename',
allowBlank:false,
anchor:'69.5%'
},{
xtype:'textfield',
fieldLabel: "STB's Course ID",
name: 'stb_course_id',
allowBlank:false,
anchor:'25%'
}

]
}],
buttons:[
{
text: 'Save',
handler: function(){
sampleUI.add.getForm().submit({});
}
}

],




}
]

})
});

Please HELP...................