原文地址:http://www.itnose.net/detail/6039858.html
[Phonegap+Sencha Touch] 移動開發19 某些安卓手機上彈出消息框 點擊後不消失的解決辦法
Ext.Msg.alert等彈出框在某些安卓手機上,點擊確定後不消失。
原因是:
消息框點擊確定後有一段css3 transform動畫,動畫完成後纔會隱藏(display:none)。有些奇葩手機就是不一樣。
解決辦法就是禁用消息框的動畫:
方法一:
在app.js的launch方法裏面加上
Ext.Msg.defaultAllowedConfig.showAnimation = false
Ext.Msg.defaultAllowedConfig.hideAnimation = false
方法二(這個估計會禁用掉很多地方的動畫效果):
在app.js的launch方法裏面加上
Ext.define('Ext.Component', {
override: 'Ext.Component',
show: function (animation) {
return this.callParent([false]);
},
hide: function (animation) {
return this.callParent([false]);
}
});