(Firefox) Click event fired on drag end
Author: satelllteCreated Mar 27, 2024Updated Apr 11, 2025
About
Not sure if this a bug or not, but it would be helpful to see what use-gesture library maintainers can tell about it...
In Firefox, click event gets fired once mouse button is released and drag gesture finished.
How to reproduce
- Go to https://use-gesture.netlify.app/docs/options/#axis
- See the radio button is set to "X axis"
- Start dragging the box and release the mouse over different radio button value ("Y axis" or "No axis lock")
- See the radio button got clicked
Additional information
The issue was originally reported by @eprincen2 in my react-knob-headless library, which consumes @use-gesture: https://github.com/satelllte/react-knob-headless/issues/57. But it turns out this is reproducible in this library itself either.
Environment
- Use Gesture version: v10.3.1
- Device: MacBook Pro
- OS: MacOS (or Linux)
- Browser: Firefox
Source: pmndrs/use-gesture