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: can not delete embed blots on android #4476

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wpj-wpj-wpj
Copy link

fix #1985

the reason of this issue

the cursor focus between the contentNode of the embed and the rightGuard of the embed which is a zero-width space

in this case, the native selection range is like

{
 start:{
   node: rightGuard,
   offset: 0,
 }
}

until now, everything is fine

but when quill normalize this range, it goes the wrong way, because offset is 0.

image

the final range we get is the position before our embed

so when you backspace

you can't delete the embed

you just delete the previous sibling

@mnordlindh
Copy link

This is the same fix as I proposed in my pull request #4464

Would be good if a maintainer could have a look at it.

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

Successfully merging this pull request may close these issues.

Can't delete embed blots on android
2 participants