标签:
在ExtJS 中,当点击其他地方时,关闭 window。
this.panel.show(); Ext.getDoc().on("mousedown", this.handleDocMouseDown, this);
handleDocMouseDown : function(e) { if (!e.within(this.panel.getEl())) { this.panel.destroy(); Ext.getDoc().un("mousedown", this.handleDocMouseDown, this); } }
Ext.applyIf(me, { items: [ { xtype: ‘button‘, text: ‘Done‘, listeners: { click: { fn: me.onDoneButtonClick, scope: me } } } ], listeners: { el: { blur: { fn: me.onWindowLoseFocus, scope:me } } } });
标签:
原文地址:http://www.cnblogs.com/yuxiaoqi/p/5103137.html