码迷,mamicode.com
首页 > 移动开发 > 详细

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

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

标签:style   class   blog   code   java   http   

修改源码文件夹下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无法点击问题 修复

标签:style   class   blog   code   java   http   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!