If I create a modal window:
Ext.define('myWindow', {
extend: 'Ext.Container',
alias: 'widget.myWindow',
floating: true,
modal: true,
listeners:
'onMaskClick???': { close the window }
.....
}
How do I know when a user has clicked on the mask outside the window? In Sench Touch, there is a config hideOnMaskTap that lets me specify. What is the event/config for extJS?
You can try this also:
I found adding a listener to the body and checking css classes felt a little hackey to me. You can actually override the private method
_onMaskClick
ofExt.ZIndexManager
(see, completely not hackey). Which allows you to add your own configuration parameter (and even event) to all windows.You can listen all click events, then check if click position is out of the window
Tramway's case (sort of) works on modal or non modal windows. But not in case child components like the boundlist of a combobox float outside the windows boundaries.
However if you use modal windows anyway you can listen for a click event on the mask like this.