zoukankan      html  css  js  c++  java
  • 移动端FastClick和editor冲突问题。

        FastClick.prototype.needsClickForParent = function (target) {
            let parent = target.parentNode;
            if (parent == null) {
                return false;
            }
            let b = (/needsclick/).test(parent.className)
            if (!b) {
                return this.needsClickForParent(parent);
            } else {
                return true;
            }
        }
     
        FastClick.prototype.needsClick = function (target) {
            if (this.needsClickForParent(target) === true) {
                return true;
            }
            switch (target.nodeName.toLowerCase()) {

                // Don't send a synthetic click to disabled inputs (issue #62)
                case 'button':
                case 'select':
                case 'textarea':
                    if (target.disabled) {
                        return true;
                    }

                    break;
                case 'input':

                    // File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
                    if ((deviceIsIOS && target.type === 'file') || target.disabled) {
                        return true;
                    }

                    break;
                case 'label':
                case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames
                case 'video':
                    return true;
            }

            return (/needsclick/).test(target.className);
        };
  • 相关阅读:
    ubuntu 安装chrome浏览器
    ubuntu下Xmodmap映射Esc和Ctrl_L
    ubuntu 设置主屏和副屏
    maven 第一次运行报错
    Intellij Idea 配置并发布tomcat项目
    Nginx跨域设置
    Inotify+rsync实现实时数据同步
    Ubuntu-18.04设置开机启动脚本
    CentOS开机自启动/etc/rc.local不执行的解决办法
    ELK之使用kafka作为消息队列收集日志
  • 原文地址:https://www.cnblogs.com/qing123/p/8708125.html
Copyright © 2011-2022 走看看