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

江枫思渺然 提交于 2020-01-05 05:48:06

问题


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:


You can use the hideOnMaskTap config.

hideOnMaskTap: true


来源:https://stackoverflow.com/questions/17610380/sencha-touch-2-ext-msg-show-and-tapping-anywhere-to-hide

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!