pmndrs / use-gesture

👇Bread n butter utility for component-tied mouse/touch gestures in React and Vanilla Javascript.
https://use-gesture.netlify.app
MIT License
9.06k stars 309 forks source link

Indeed tap, but state.tap is still false #455

Closed yeefun closed 2 years ago

yeefun commented 2 years ago

Describe the bug

It related to filterTaps, but it's hard to reproduce.

https://github.com/pmndrs/use-gesture/blob/2d943428cc1242f773248ebe85760513bd136c52/packages/core/src/engines/DragEngine.ts#L230-L235

Sometimes, users indeed tap, but state.tap is still false. It cancels other click events because of event.stopPropagation(). I have traced the source code, but it seemed no problem.

Could you provide an option pointer.mouse like pointer.touch, or to disable pointer events? If we find pointer events have some problems (maybe it related to browser implementations), we can choose not to use it.

Information:

Checklist:

dbismut commented 2 years ago

Released in 10.2.29, pointer.mouse