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

Mouse Pointer Stuck to Top Left in Drag Preview Despite Using preserveOffsetOnSource Utility #54

Open
RabiRoshan opened this issue May 14, 2024 · 4 comments

Comments

@RabiRoshan
Copy link

Issue:

I'm attempting to replicate the Board Example, but I'm encountering an issue where the mouse pointer on the drag preview is consistently stuck to the top left corner, unlike the example in the documentation. I'm unsure if I'm misinterpreting the utility preserveOffsetOnSource, but it doesn't seem to work for me. In the meantime, I found a workaround using the solution mentioned here: #25 (comment). It would be fantastic if this issue could be resolved according to the documentation.

This library is excellent, and I would love to contribute! ❤️

Versions:

  • "react": "^18.2.0"
  • "@atlaskit/pragmatic-drag-and-drop": "^1.1.7"

Import used:

import { preserveOffsetOnSource } from '@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source'
@alexreardon
Copy link
Collaborator

Hi there,

Could you please post a codesandbox with the issue you are experiencing? It's difficult to know what is going on without an example to play with.

@RabiRoshan
Copy link
Author

Hey @alexreardon,
here is the codesandbox as requested: https://codesandbox.io/p/sandbox/pragmatic-dnd-preserveoffsetonsource-kr2cz2

@alexreardon
Copy link
Collaborator

Thank you for the example. It's really helpful. Taking a look now

@RabiRoshan
Copy link
Author

Hey @alexreardon , just dropping a reminder 🙌.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants