简体   繁体   中英

Sencha Touch 2: Ext.Msg.show and tapping anywhere to hide

I want to display the popup message without any buttons. The message disappears if you tap on it. The code works fine and was taken from Sencha Touch 2: tapping Ext.Msg.show that have no buttons , thank you Viswa.

   Ext.Msg.show({
        title: 'Title',
        message: 'Some text goes here...',
        itemId : 'showMsg',
        buttons : [],
        listeners:[ 
            {
                element: 'element',
                delegate: '',
                event: 'tap',
                fn: function() {
                    this.hide();
                }
            }]
    });

How to make it disappeared when you tap anywhere on the screen , not on the popup message?

您可以使用hideOnMaskTap配置。

hideOnMaskTap: true

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM