-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
Description
- I have searched the issues of this repository and believe that this is not a duplicate.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Version
2.2.1
Environment
windows10 专业版
Reproduction link
Steps to reproduce
左右滑动Carousel组件,控制台报 [Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive.
What is expected?
正常滑动,控制台无报错信息
What is actually happening?
正常滑动,控制台报错
不影响用户操作,但是控制台会一直报错,对错误收集会有影响
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
ant-design-bot commentedon Jul 2, 2018
Translation of this issue:
Carousel slip error
Version
2.2.1
Environment
Windows10 Professional Edition
Reproduction link
https://blog.guanjp.com/
Steps to reproduce
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.
What is expected?
Normal sliding, no error message on the console
What is actually happening?
Normal sliding, console error
Does not affect user operations, but the console will always report an error, which will affect the error collection.
ziluo commentedon Jul 3, 2018
Related to Passive Event Listeners, fix it later
territoryfan commentedon Jul 19, 2018
I met too, version: "antd-mobile": "^2.1.9"
750973092 commentedon Sep 13, 2018
同样的问题,好久了怎么还没修复?
hellosean1025 commentedon Sep 21, 2018
什么时候能够修好?
hellosean1025 commentedon Sep 21, 2018
@750973092 @territoryfan @guanjp
等官方修复黄花菜都凉了,大家直接用老外的吧,还有 antd-mobile carousel组件也是基于这个开发的
https://github.com/FormidableLabs/nuka-carousel
试用反馈:基本跟 antd-mobile carousel差不多,有两个按钮可以通过下面css 隐藏掉:
qhy90223 commentedon Oct 26, 2018
me too
toFrankie commentedon Dec 18, 2018
应该不是官方的锅,好像是Chrome浏览器新版本的原因,试看一下这篇文章:chrome 监听touch类事件报错:无法被动侦听事件preventDefault。我在Safari控制台是看不到同样的error的。
watsonhaw commentedon Mar 13, 2019
好像这个是浏览器的问题,请问有方法可以让浏览器不提示error吗?ant的大大们
vnues commentedon May 30, 2019
touch-action: pan-y;
加上这段样式就能屏蔽了
flyingcrp commentedon Jul 25, 2019
worked for me .
anyway ,there are many bugs waiting to be fixed
hansinhu commentedon Sep 11, 2019
rmc-nuka-carousel源码在哪里,nuka-carousel 已经 v4+了,rmc-nuka-carousel 始终未更新
Shuo-Mr commentedon Aug 5, 2021
@vnues
请问加在哪里?我加在Carousel上面没有效果,Carcousel下的每个子项也都测试加过,并没有效果。
谢谢。
其他尝试:
也试过监听Carousel的touchmove事件,并设置passive : false, 也没有效果。
最后我找到node_modules 下的 rmc-nuka-carousel 包,删除event.preventDefault(), 的确抛出错误了,但是这并无意义。
awmleer commentedon Nov 17, 2021
v2 已停止维护了,可以考虑升级一下