Quill removes the entire word when using the space after a word with a link
Quill removes the entire word when using the space after a word with a link
Steps for Reproduction
- Visit https://codepen.io/stirelli/pen/GwyWjB
- Select the word 'links'
- Set a link
- Make an space at the end of the word
Expected behavior: Should make a normal space
Actual behavior: Quill removes the entire word
Platforms: Chrome 70.0.3538.77 (Official Build) (64-bit) Ubuntu 18.10
Version: v2.0.0-dev.3
Looks like it only happens when the text is bold. Additional information:
- if you have some bold text with a link in the middle, putting a space after the link deletes the link & puts the cursor at the end of the bold text.
I confirmed that this also happens when text is in italics or underlined, I believe it's related to having the <a> nested inside of another tag. I traced the actual removal to https://github.com/quilljs/parchment/blob/2.0/src/blot/abstract/parent.ts#L237
inside of parchment, but I don't have enough depth of knowledge at the moment to understand why the problem is occurring.
Checking out the mutations that cause it, it looks like there's quite a lot going on in there for adding a single character. That's pretty much where I'm getting stuck on tracing it though.

Fixed in https://github.com/quilljs/quill/pull/3807. Feel free to let me know if there is anything missing. Closing...