PDA

View Full Version : Window fails to close on second click of X button (Firefox 3.6, Chrome 8 ExtJs 3.3)



mangotang
28 Jan 2011, 4:19 PM
version 3.3
Firefox 3.6 Chrome 8.0
Windows 7

Clicking on a window's X button to hide it works the first time. But if the window is shown again, and then the X button is clicked, the window fails to hide.



var win;

var handler = function (button) {
win = new Ext.Window({
animateTarget: button.el
, html: 'The window'
, closeAction: 'hide'
, id: 'mywin'
, height: 200
, width: 300
, constrain: false
, listeners: {
beforehide: function () {
console.log('beforehide');
},
hide: function () {
console.log('hide');
}
}
});
win.show();
};

Ext.create({
renderTo: Ext.getBody()
, xtype: 'button'
, text: 'open'
, handler: handler
});