rgraff
10-23-2006, 01:00 PM
If you call tabPanel.activate() on the current tab, it will fire the onTabChange event even though there was no change.
Should be a simple fix....
/** * Activate a TabPanelItem. The currently active will be deactivated.
* @param {String} id The id of the TabPanelItem to activate.
*/ activate : function(id){
var tab = this.items[id];
if (tab == this.active) { // Added
return; // these
} // lines
if(!tab.disabled){
if(this.active){
this.active.hide();
}
this.active = tab; // changed from this.active = this.items[id]; a little shorter.
this.active.show();
this.onTabChange.fireDirect(this, this.active);
}
},
-Robert
Should be a simple fix....
/** * Activate a TabPanelItem. The currently active will be deactivated.
* @param {String} id The id of the TabPanelItem to activate.
*/ activate : function(id){
var tab = this.items[id];
if (tab == this.active) { // Added
return; // these
} // lines
if(!tab.disabled){
if(this.active){
this.active.hide();
}
this.active = tab; // changed from this.active = this.items[id]; a little shorter.
this.active.show();
this.onTabChange.fireDirect(this, this.active);
}
},
-Robert