Ext.override(Ext.TabPanel, {
initEvents : function(){
Ext.TabPanel.superclass.initEvents.call(this);
this.on('add', this.onAdd, this);
this.on('remove', this.onRemove, this);
this.strip.on('mousedown', this.onStripMouseDown, this);
this.strip.on('contextmenu', this.onStripContextMenu, this);
this.strip.on('dblclick', this.onTitleDbClick, this);
if(this.enableTabScroll){
this.strip.on('mousewheel', this.onWheel, this);
}
},
onTitleDbClick:function(e,target,o){
var t = this.findTargets(e);
if (t.item.fireEvent('beforeclose', t.item) !== false && t.item.closable!==false) {
t.item.fireEvent('close', t.item);
this.remove(t.item);
}
}
});