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

时间:2014-06-10 16:51:30   收藏:0   阅读:457

修改源码文件夹下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

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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!