X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/b37ceabb82336ee82757cd32efe353cfab8ec267..f5240829880f87e0cf581c6a296e436fdef0ef80:/src/widgets/Button.js diff --git a/src/widgets/Button.js b/src/widgets/Button.js index a8935ec4..1689dd09 100644 --- a/src/widgets/Button.js +++ b/src/widgets/Button.js @@ -1,5 +1,5 @@ /*! - * Ext JS Library 3.2.2 + * Ext JS Library 3.3.0 * Copyright(c) 2006-2010 Ext JS, Inc. * licensing@extjs.com * http://www.extjs.com/license @@ -624,9 +624,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { return; } if(!this.disabled){ - if(this.enableToggle && (this.allowDepress !== false || !this.pressed)){ - this.toggle(); - } + this.doToggle(); if(this.menu && !this.hasVisibleMenu() && !this.ignoreNextClick){ this.showMenu(); } @@ -637,6 +635,13 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { } } }, + + // private + doToggle: function(){ + if (this.enableToggle && (this.allowDepress !== false || !this.pressed)) { + this.toggle(); + } + }, // private isMenuTriggerOver : function(e, internal){