Hi all
This is a patch/workaround to can hide a message box while is dragging
.
The basics on the patch is calling Ext.dd.DragDropMgr.stopDrag() on the method hide at MessageBox:
Code:
..............
hide : function(){
Ext.dd.DragDropMgr.stopDrag(); //PATCH call stopdrag
if(this.isVisible()){
dlg.hide();
handleHide();
}
return this;
},
..............
But as a workaround, you can't override this function because hide is accessing private variable(dlg) and functions (handleHide)
.
So, you can use this next as a workaround (forever or until this patch or some other solution is included into the official code
).
This workaround consists in creating an interceptor doing the work on the hide function:
Code:
Ext.onReady({
.............
Ext.apply(Ext.MessageBox,{
hide: Ext.MessageBox.hide.createInterceptor(function(){
Ext.dd.DragDropMgr.stopDrag();
})
});
................
});
Hope this can help you...
Regards