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 cursor changing to default when resizing image (#4317) #4318

Merged

Conversation

MohitSinghChauhan
Copy link
Contributor

This commit fixes the issue of the cursor changing to default when resizing an image. The change was made in the setEndCursor() function, where the cursor property of the editorRootElement is set to text. This ensures that the cursor changes to the expected text cursor when hovering over the text.

No other changes were made in this commit.

@vercel
Copy link

vercel bot commented Apr 13, 2023

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

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 13, 2023 3:03am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 13, 2023 3:03am

@facebook-github-bot
Copy link
Contributor

Hi @MohitSinghChauhan!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@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 Apr 13, 2023
@zurfyx
Copy link
Member

zurfyx commented Apr 13, 2023

Thank you! Could you explain how your PR makes the existing behavior better (to what it was it before)? I can't repro this #4317 in Chrome, but I can still repro the same issue in Safari even after your fix

Screen.Recording.2023-04-13.at.11.22.38.AM.mov

@MohitSinghChauhan
Copy link
Contributor Author

MohitSinghChauhan commented Apr 13, 2023

Could you please specify the issue you are facing in Safari?

I was able to fix a bug that caused the cursor to change to the default arrow when hovering over text after resizing an image instead of changing to the expected text cursor. I fixed this issue by updating the CSS property of the editor element in the setEndCursor() function, which is called just before the image resizing is completed.

Based on the video you provided, it seems that the cursor is incorrectly set to text while resizing the image. However, if you could provide more details about the issue you are facing in Safari, I would be happy to investigate and help resolve the problem.

@zurfyx
Copy link
Member

zurfyx commented Apr 13, 2023

Could you please specify the issue you are facing in Safari?

I was able to fix a bug that caused the cursor to change to the default arrow when hovering over text after resizing an image instead of changing to the expected text cursor. I fixed this issue by updating the CSS property of the editor element in the setEndCursor() function, which is called just before the image resizing is completed.

Based on the video you provided, it seems that the cursor is incorrectly set to text while resizing the image. However, if you could provide more details about the issue you are facing in Safari, I would be happy to investigate and help resolve the problem.

Oh yeah, I understand the fix now. Safari looks like another issue. Basically, the resize cursor gets lost while I'm still resizing.

Thank you, will merge the PR now! Feel free to look into this other issue separately

@zurfyx zurfyx merged commit 1cf528d into facebook:main Apr 13, 2023
44 of 45 checks passed
@MohitSinghChauhan
Copy link
Contributor Author

Great, glad to hear that you understand the fix! And thanks for merging the PR. As for the new issue you mentioned, I can definitely look into it separately.

@acywatson acywatson mentioned this pull request Apr 14, 2023
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