Code:
function vishal(){
                alert('close called');
                Ext.get(document.body).unmask();
}
var win = new Ext.Window({
        title:'User Information',
        items:form,
        closeAction:'hide',
        listeners:{
            beforeclose:vishal
        }
});
    

function showWin(){
    Ext.get(document.body).mask();
    win.show();
}

I am trying to open a window on a grid cell click masking the body, after save i want to unmask it, but the listener is not functioning, i am sure i have done something wrong.

Please suggest if i can do it in a beter way. Thanks