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

2019-07-29 07:52发布

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?

1条回答
smile是对你的礼貌
2楼-- · 2019-07-29 08:00

You can use the hideOnMaskTap config.

hideOnMaskTap: true
查看更多
登录 后发表回答