mprice
1 Feb 2010, 1:31 PM
If a closable tab contains a tbar with a menu, and the menu is open, and then the tab is closed, a demo error is thrown. You can reproduce by adding the highlighted code below to the advanced tabs sample. This issue did not occur in 3.0, and still appears to be an issue in the 3.1.1 beta.
/*!
* Ext JS Library 3.1.0
* Copyright(c) 2006-2009 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
*/
Ext.onReady(function(){
var tabs = new Ext.TabPanel({
renderTo:'tabs',
resizeTabs:true, // turn on tab resizing
minTabWidth: 115,
tabWidth:135,
enableTabScroll:true,
width:600,
height:250,
defaults: {autoScroll:true},
plugins: new Ext.ux.TabCloseMenu()
});
// tab generation code
var index = 0;
while(index < 7){
addTab();
}
function addTab(){
tabs.add({
title: 'New Tab ' + (++index),
iconCls: 'tabs',
html: 'Tab Body ' + (index) + '<br/><br/>'
+ Ext.example.bogusMarkup,
closable:true,
tbar: [{
text: 'test',
menu: [{text: 'test'}]
}]
}).show();
}
new Ext.Button({
text: 'Add Tab',
handler: addTab,
iconCls:'new-tab'
}).render(document.body, 'tabs');
});
Open the menu inside any of the tabs, and then attempt to close that tab with the menu still open. The following error is received. I get this error in IE 8 and FF 3.6, but not in Chrome 5.0.
Message: 'dom' is null or not an object
Line: 7
Char: 46976
Code: 0
URI: http://asnb0092/testing/EXTJS311/ext-all.js
See this jing for a recording of the issue:
http://screencast.com/t/NzU2MTYxYz
/*!
* Ext JS Library 3.1.0
* Copyright(c) 2006-2009 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
*/
Ext.onReady(function(){
var tabs = new Ext.TabPanel({
renderTo:'tabs',
resizeTabs:true, // turn on tab resizing
minTabWidth: 115,
tabWidth:135,
enableTabScroll:true,
width:600,
height:250,
defaults: {autoScroll:true},
plugins: new Ext.ux.TabCloseMenu()
});
// tab generation code
var index = 0;
while(index < 7){
addTab();
}
function addTab(){
tabs.add({
title: 'New Tab ' + (++index),
iconCls: 'tabs',
html: 'Tab Body ' + (index) + '<br/><br/>'
+ Ext.example.bogusMarkup,
closable:true,
tbar: [{
text: 'test',
menu: [{text: 'test'}]
}]
}).show();
}
new Ext.Button({
text: 'Add Tab',
handler: addTab,
iconCls:'new-tab'
}).render(document.body, 'tabs');
});
Open the menu inside any of the tabs, and then attempt to close that tab with the menu still open. The following error is received. I get this error in IE 8 and FF 3.6, but not in Chrome 5.0.
Message: 'dom' is null or not an object
Line: 7
Char: 46976
Code: 0
URI: http://asnb0092/testing/EXTJS311/ext-all.js
See this jing for a recording of the issue:
http://screencast.com/t/NzU2MTYxYz