X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/f5240829880f87e0cf581c6a296e436fdef0ef80..0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6:/src/widgets/Button.js diff --git a/src/widgets/Button.js b/src/widgets/Button.js index 1689dd09..b6d363aa 100644 --- a/src/widgets/Button.js +++ b/src/widgets/Button.js @@ -1,8 +1,8 @@ /*! - * Ext JS Library 3.3.0 - * Copyright(c) 2006-2010 Ext JS, Inc. - * licensing@extjs.com - * http://www.extjs.com/license + * Ext JS Library 3.3.1 + * Copyright(c) 2006-2010 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license */ /** * @class Ext.Button @@ -194,6 +194,11 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { */ initComponent : function(){ + if(this.menu){ + this.menu = Ext.menu.MenuMgr.get(this.menu); + this.menu.ownerCt = this; + } + Ext.Button.superclass.initComponent.call(this); this.addEvents( @@ -256,8 +261,9 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { */ 'menutriggerout' ); - if(this.menu){ - this.menu = Ext.menu.MenuMgr.get(this.menu); + + if (this.menu){ + this.menu.ownerCt = undefined; } if(Ext.isString(this.toggleGroup)){ this.enableToggle = true;