2.2.1
windows10 专业版
左右滑动Carousel组件,控制台报 [Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive.
正常滑动,控制台无报错信息
正常滑动,控制台报错
不影响用户操作,但是控制台会一直报错,对错误收集会有影响
Translation of this issue:
2.2.1
Windows10 Professional Edition
Slide the Carousel component left and right, the console reports [Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive.
Normal sliding, no error message on the console
Normal sliding, console error
Does not affect user operations, but the console will always report an error, which will affect the error collection.
Related to Passive Event Listeners, fix it later
I met too, version: "antd-mobile": "^2.1.9"
同样的问题,好久了怎么还没修复?
什么时候能够修好?
@750973092 @territoryfan @guanjp
等官方修复黄花菜都凉了,大家直接用老外的吧,还有 antd-mobile carousel组件也是基于这个开发的
https://github.com/FormidableLabs/nuka-carousel
试用反馈:基本跟 antd-mobile carousel差不多,有两个按钮可以通过下面css 隐藏掉:
.slider{
.slider-control-centerright{
display:none;
}
.slider-control-centerleft{
display:none;
}
}
me too
应该不是官方的锅,好像是Chrome浏览器新版本的原因,试看一下这篇文章:chrome 监听touch类事件报错:无法被动侦听事件preventDefault。我在Safari控制台是看不到同样的error的。
好像这个是浏览器的问题,请问有方法可以让浏览器不提示error吗?ant的大大们
touch-action: pan-y;
加上这段样式就能屏蔽了
touch-action: pan-y;
加上这段样式就能屏蔽了
worked for me .
anyway ,there are many bugs waiting to be fixed
rmc-nuka-carousel源码在哪里,nuka-carousel 已经 v4+了,rmc-nuka-carousel 始终未更新
Most helpful comment
touch-action: pan-y;加上这段样式就能屏蔽了