[错误] `pointerDown` 中的 `setPointerCapture` 应包裹在 try-catch 中
作者: rj-luo创建于 2026年3月6日更新于 2026年3月6日
错误描述
当使用 useDrag 与 pointer.capture: true (默认值) 时,pointerDown() 中的 setPointerCapture() 在建立捕获前取消指针时会抛出 DOMException: InvalidPointerId (例如在移动设备上快速点击)。
内容来源: pmndrs/use-gesture