PDA

View Full Version : Window Forms inside Tabpanel remain visible after closing the tab



sophicworks
26 Jul 2012, 1:03 AM
Hi, I'am new to extjs, so I'am not sure if its a bug or not so I posted it here.

I have Tabpanel, each Tab has gridpanel inside with buttons that will pop-up window forms(modal is set to true).
37490


My problem is that when there is only one Tabpanel item and try to close the Tab while window form is still active/open/showing, the window form and its modal mask remain visible (suppose to be deleted together with its container)

3749137493

I hope you can help me fix this, Thanks in advance

WillBill
26 Jul 2012, 3:39 AM
You could use the beforedestroy event to check if your window is showing



listeners: {
beforedestroy: function() {
if(window = Ext.getCmp('userWindow'))
window.destroy();
}
}

sophicworks
26 Jul 2012, 6:29 PM
You could use the beforedestroy event to check if your window is showing



listeners: {
beforedestroy: function() {
if(window = Ext.getCmp('userWindow'))
window.destroy();
}
}


thanks for the reply mate. but it seems that closing the tab doesn't fire the destroy/beforedestroy event,
anyway thank you for the idea. I appreciate your help :D