sencha touch messagebox unclickable

≡放荡痞女 提交于 2019-12-20 01:07:14

问题


In sencha touch we have a little problem with a messagebox. It looks that it's something with android 4.3. On the most devices it's works perfect, but on a device with android 4.3, when the user press the button, the messagebox will not disappear.

Ext.define('TestBuild.view.MyPanel', {
extend: 'Ext.Panel',

config: {
    items: [
        {
            xtype: 'button',
            itemId: 'mybutton',
            text: 'MyButton'
        }
    ],
    listeners: [
        {
            fn: 'onMybuttonTap',
            event: 'tap',
            delegate: '#mybutton'
        }
    ]
},

onMybuttonTap: function(button, e, eOpts) {
    console.log("Test");
    Ext.Msg.alert("TEST");
}

});

回答1:


I found the solution:

Add Following line before showing Alert Box:

Ext.Msg.defaultAllowedConfig.showAnimation = false;




回答2:


I found a solution:

Ext.define('Ext.Component', {
        override: 'Ext.Component',
        show: function (animation) {
            return this.callParent([false]);
        },
        hide: function (animation) {
            return this.callParent([false]);
        }
    });

I found the solution on http://www.sencha.com/forum/showthread.php?262324-Sencha-Messagebox-and-Overlay-Problems-on-HTC-One-Browser




回答3:


I got a solution here: https://www.sencha.com/forum/showthread.php?284450-MessageBox-cannot-be-closed-under-some-circumstances.&p=1040686&viewfull=1#post1040686

Ext.override(Ext.MessageBox, {    
    hide:  function() {
       if (this.activeAnimation && this.activeAnimation._onEnd) {
        this.activeAnimation._onEnd();
       }
       return this.callParent(arguments);
   }
}); 

This works for me for touch 2.4.2



来源:https://stackoverflow.com/questions/21024726/sencha-touch-messagebox-unclickable

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