首页 > 解决方案 > 我在使用 react-use-gesture 时遇到了这个错误

问题描述

有时会抛出此错误并阻止手势:

315[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.

标签: reactjsreact-use-gesture

解决方案


文档提到了这一点:https ://use-gesture.netlify.app/docs/faq/#why-am-i-getting-warnings-from-preventdefault-after-i-pass-passivefalse

该库会在内部检查事件是否可取消,但它无法阻止用户执行自己的逻辑。


推荐阅读