Ext.window.messagebox Draggable False, Error Calling Hide Method
After creating an instance of MessageBox like this var msgBox = Ext.create('Ext.window.MessageBox',{draggable: false}); -actually draggable false was set through an
Solution 1:
To avoid this error I'm overriding hide method on MessageBox class:
Ext.define('Ext.window.MessageBox', {
override: 'Ext.window.MessageBox',
hide : function () {
/**
* this is the default implementation of hide in minus MessageBox the commented line
* */var me = this;
//me.dd.endDrag();
me.progressBar.reset();
me.removeCls(me.cfg.cls);
/**
* this is the implementation of hide in Ext.Component
* avoided callParent() because that would have called the overridden hide method
*/
me.showOnParentShow = false;
if (!(me.rendered && !me.isVisible()) && me.fireEvent('beforehide', me) !== false) {
me.hidden = true;
if (me.rendered) {
me.onHide.apply(me, arguments);
}
}
return me;
}
});
Update, this was the original override
Ext.window.Window.override({
initComponent: function () {
this.draggable = false;
this.resizable = false;
this.callParent();
}
});
I'm open to suggestions to avoid this override. Thanks.
Post a Comment for "Ext.window.messagebox Draggable False, Error Calling Hide Method"