移动端项目中,在滚动的时候,会报出以下提示: [Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080 解决 在touch的事件监听方法上绑定第三个参数{ passive: false }, 通过传递 passive 为…
Unable to preventDefault inside passive event listener due to target being treated as passive 今天在做项目的时候发现这个问题:于是Google了一下! 由于浏览器必须要在执行事件处理函数之后,才能知道有没有掉用过 preventDefault() ,这就导致了浏览器不能及时响应滚动,略有延迟. 所以为了让页面滚动的效果如丝般顺滑,从 chrome56 开始,在 window.document 和 bod…
最近两天企业微信下IScroll突然无法滚动了,特别慢,之前好好的,发现主要是有红色的Unable to preventDefault inside passive event listener due to target being treated as passive频繁输出到控制台.在网上查找方法1.css里统一加 *{touch-action: none;} 2.将false修改为passive:false document.addEventListener('touchmove', f…
1 前言 在制作2048时,需要在手机端添加滑动检测事件,然后发现控制台有警告,如下: main2048.js:218 [Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080 2 解决办法: 在touch的事件监听方法…
最近做项目经常在 chrome 的控制台看到如下提示: Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080 于是 Google 了一番,找到这篇文章,有了详细解释.Making touch scrolling fast by default 简…
页面提示: 点击该事件:页面提示:[8mui.min.js:7 [Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080.] 解方法:给您的样式中加入下面的样式即可解决去掉错误提示. * { touch-action:…
使用fastClick.js所产生的一些问题 开发h5活动页时想到移动端会有300ms的延迟,于是便打算用fastClick.js解决. 页面引入fastClick.js后,滑动H5页面的时候发现谷歌浏览器会报错,如下: Unable to preventDefault inside passive event listener due to target being treated 查询了之后发现这是因为Chrome及其内核浏览器更新了一项新特性,原先只会报黄色等级的错误,现在升到红色了.那么…
1: Building workspace has encountered a problem Errors occurred during the build 如果报错这个 那么有可能是jar包,报错了,因为jar包报错(即使没报错也可能是svn检出项目的时候jar包缺少,MyEclipse并没有扫描到那么多的jar包,导致缺少),项目也是不会进行编译的 解决方法,删除jar包,重新导入一下jar包就可以了 2: Building workspace has encountered a…
在有几个应用中,在启动的时候发现下列警告: The version of the script (3.5.29) doesn't match the version of this Wrapper (3.5.27). This might cause some problems--> Wrapper Started as DaemonJava Service Wrapper Community Edition 64-bit 3.5.27 Copyright (C) 1999-2015 Tanuk…
Multiple annotations found at this line:- String cannot be resolved to a type- The method getContextPath() from the type HttpServletRequest refers to the missing type String 解决办法: 首先 右击该项目 - Build Path - Configure Build Path , 在 Libraries 选项下,会发现有个出错…
https://www.cnblogs.com/shihua513/p/6163682.html 在eclipse下用maven编译时,很有可能出现以下错误: Please ensure you are using JDK 1.4 or above andnot a JRE (the com.sun.tools.javac.Main class is required). // 请确保您使用的是JDK 1.4或以上版本 不是一个JRE(com.sun.tools.javac.主类是必需的).//…