首页 > 移动平台 > 详细

sencha touch 小米3无法点击问题 修复

时间:2014-06-10 16:51:30      阅读:455      评论:0      收藏:0      [点我收藏+]

修改源码文件夹下event/publisher/Dom.js中的attachListener方法,代码如下

bubuko.com,布布扣
attachListener: function(eventName, doc) {
        if (!doc) {
            doc = document;
        }

        var defaultView = doc.defaultView;

        if (Ext.os.is.iOS && Ext.os.version.getMajor() < 5) {
            document.addEventListener(eventName, this.onEvent, !this.doesEventBubble(eventName));
        }
        else if (defaultView && defaultView.addEventListener) {
            //这里对米3做了适配
            if(/MI 3 Build/.test(navigator.userAgent)){
                document.addEventListener(eventName, this.onEvent, !this.doesEventBubble(eventName));
            }else{
                doc.defaultView.addEventListener(eventName, this.onEvent, !this.doesEventBubble(eventName));
            }
        }
        else {
            doc.addEventListener(eventName, this.onEvent, !this.doesEventBubble(eventName));
        }
        return this;
    }
bubuko.com,布布扣

 

 

sencha touch 小米3无法点击问题 修复,布布扣,bubuko.com

sencha touch 小米3无法点击问题 修复

原文:http://www.cnblogs.com/cjpx00008/p/3779533.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!