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

fix: set cursor grab when image can be dragged #2831

Merged
merged 3 commits into from
Aug 18, 2022

Conversation

LuciNyan
Copy link
Contributor

Description

set cursor grab when image can be dragged.

Additionally

I've tried a lot but still can't resolve the problem of not being able to set the cursor when dragging

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 13, 2022
@vercel
Copy link

vercel bot commented Aug 13, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
lexical ✅ Ready (Inspect) Visit Preview Aug 14, 2022 at 3:22AM (UTC)
lexical-playground ✅ Ready (Inspect) Visit Preview Aug 14, 2022 at 3:22AM (UTC)

@fantactuka
Copy link
Contributor

Have you tried to set cursor style to document body while dragging?

@LuciNyan
Copy link
Contributor Author

LuciNyan commented Aug 13, 2022

Have you tried to set cursor style to document body while dragging?

Yes, I tried, but it didn't work.

I tried adding it to the document body, to the dragged element, to the image in setDragImage, etc.. None of these work, and I'm using Chrome on a mac.

@fantactuka
Copy link
Contributor

Even with "!important"? 😯

@LuciNyan
Copy link
Contributor Author

Even with "!important"? 😯

Yes... This is strange. Will it work on windows? I'm curious.

@fantactuka
Copy link
Contributor

Even with "!important"? 😯

Yes... This is strange. Will it work on windows? I'm curious.

Looks like browser forces cursor if has drag data: https://bugs.chromium.org/p/chromium/issues/detail?id=1196385

@fantactuka fantactuka merged commit b79b746 into facebook:main Aug 18, 2022
thegreatercurve pushed a commit that referenced this pull request Nov 25, 2022
* fix: set cursor grab when image can be dragged

* chore: trigger test

* chore: trigger test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants