• 移动端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);
        };
  • 相关阅读:
    java程序运行时内存分配详解 (转)
    android命令安装apk时报错:INSTALL_FAILED_CPU_ABI_INCOMPATIBLE
    android中的命令安装与卸载
    遇到问题的态度
    java中的Robot
    Python中*args 和**kwargs作为形参和实参时的功能详解
    python使用selenium执行JS快速完成超长字符串的输入
    python中多模块导入的注意点
    Python中的GIL锁
    不用下载Axure RP Extension for Chrome插件查看原型文件的方法
  • 原文地址:https://www.cnblogs.com/qing123/p/8708125.html
Copyright © 2020-2023  润新知