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);
        };
  • 相关阅读:
    Jmeter性能监测及安装插件(推荐)
    测试用例使用传统excel还是思维导图(Xmind、MindManager等)?
    测试用例设计
    一个资深测试员的感悟
    log4j教程 10、PatternLayout
    log4j教程 9、HTMLLayout
    log4j教程 8、日志格式化
    log4j教程 7、日志记录级别
    log4j教程 6、Logger方法
    log4j教程 5、示例程序
  • 原文地址:https://www.cnblogs.com/qing123/p/8708125.html
Copyright © 2011-2022 走看看