-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useDrag is noticeably less responsive than useMove using Firefox #581
Comments
Unfortunately I only have a 60hz monitor at the moment. |
Indeed, the sandbox was broken, I've updated it, I've also added a video recorded at 120hz but slowed down by 50% so that the difference is visible at 60hz |
Hi @HeartofPhos, finally had the time to look into this. https://stackblitz.com/edit/react-ts-wmbqww?file=App.tsx I've removed react-spring to focus on the lib only. The red square uses the genuine |
This issue seems to still be present, the red square still has significant stuttering while the green square is smooth as expected |
I've rerecorded the issue at 240fps and slowed the footage to 0.25 speed. stutter.mp4 |
Thanks. There's a few things we could try but I'm afraid we'll have to try a debug session together as I'm not sure I'll be able to reproduce the issue on my own, not having a 120hz monitor. Can you try adding me on discord? |
For reference and following our call @HeartofPhos, we've observed that the issue comes from this line:
In fact, because of Firefox protection against fingerprinting, the The options would be:
|
Describe the bug
Dragging a div using
useDrag
appears to stutter compared touseMove
, this happens while using Firefox but not Edge.The issue is not noticeable at 60hz, a high refresh rate display is required to reproduce the issue, it is easily noticeable at 120hz/240hz
The issue occurs regardless of whether react-spring spring being used.
Sandbox or Video
Sandbox (updated)
Video
Information:
Checklist:
touch-action: none
to the draggable element.The text was updated successfully, but these errors were encountered: