How to close modal window extjs when clicking on mask?

前端 未结 4 1174
遇见更好的自我
遇见更好的自我 2021-02-05 16:19

If I create a modal window:

Ext.define(\'myWindow\', {
    extend: \'Ext.Container\',
    alias: \'widget.myWindow\',
    floating: true,
    modal: true,
    li         


        
4条回答
  •  花落未央
    2021-02-05 16:37

    You can try this also:

    Ext.getBody().on('click', function(e, t){
        var el = win.getEl();
    
        if (!(el.dom === t || el.contains(t))) {
            win.close();
        }
    });
    

提交回复
热议问题