Skip to content
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

Clicked item gets dragged twice as quickly as other selected items #244

Open
herringlarry2 opened this issue Jan 6, 2025 · 0 comments
Open

Comments

@herringlarry2
Copy link

Describe the bug
If I drag to select some items and then click one of them to initiate the drag then the item I clicked moves twice as fast as the other items and my cursor. Alternatively, if I just click and drag a single item (no multi-select) I observe the same behavior: the item moves twice as fast as my cursor. I am using your library's react integration in my next.js app.

I am able to fix the issue by setting reactStrictMode to false in my next.config.ts. However seeing as reactStrictMode: true is the general best practice I believe that it would be ideal if the library worked properly with it enabled.

To Reproduce
Steps to reproduce the behavior:

  1. Clone and run this repo https://github.com/herringlarry2/ReproDragBug.
  2. Ensure that reactStrictMode is set to true in next.config.ts

Expected behavior
Selected items all move at the rate that the cursor moves.

Code Example
Clone and run this repo:

https://github.com/herringlarry2/ReproDragBug

Screenshots

With Strict Mode On:

Screen.Recording.2025-01-05.at.10.21.42.PM.mov

With Strict Mode Off:

upload-bug-repro.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant