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: backspace in Android not deleting first character #5282

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

kirandash
Copy link
Contributor

Fix for issue: #5274

@facebook-github-bot
Copy link
Contributor

Hi @kirandash!

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!

Copy link

vercel bot commented Nov 25, 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 Nov 25, 2023 10:21am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 25, 2023 10:21am

@acywatson
Copy link
Contributor

Thanks for submitting this - running the CI now.

@acywatson
Copy link
Contributor

Can you provide a quick explanation as to how this fixes the issue/how you arrived at this solution?

@kirandash
Copy link
Contributor Author

Can you provide a quick explanation as to how this fixes the issue/how you arrived at this solution?

After some debugging on android I found that the deletion was not happening when the number of characters on selected node text content is <= 1 probably because of the current issue on android chrome as pointed out here: #4941 (comment).

Hence I decided to do override the default android behaviour only when the text length <=1 and do a manual trigger for the deletion similar to what was implemented in the else block.

Not sure if it's the best solution. But for now this is the only solution I could think of. Please do let me know if this can be improved..

@acywatson acywatson merged commit 4d2e310 into facebook:main Nov 28, 2023
44 checks passed
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.

3 participants