Instead of calling
tabPanel.items.removeAt(i);
Call
tabPanel.remove(tabPanel.items.getAt(i));
Then you tell the container instead of the mixed collection to remove the tab
Another way to do this is
tabPanel.removeChildEls(function(tab){
return tab != tabPanel.items.first();
});
source
share