Reputation: 17000
I have a window and a form inside which is putting LoadMask on its submit. While submitting process I catch ESC
key pressing on window not to allow user to close it during form submit.
How to determine has form active LoadMask or not?
Maybe something like stores isLoading()
method?
Upvotes: 3
Views: 3056
Reputation: 16130
If you mask Element
(for example grid.getEl().mask()
) then there is such method: grid.getEl().isMasked()
.
If you use LoadMask
then try this:
var myMask = new Ext.LoadMask(grid, {msg:"Please wait..."});
myMask.show();
Ext.ComponentMgr.each(function(i, value){
if ((value instanceof Ext.LoadMask) && value.isVisible() &&
(value.ownerCt === panel || value.floatParent == panel))
{
alert('masked');
return false;
}
});
Working sample: http://jsfiddle.net/Hsy5c/8/
Upvotes: 9