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

Quill removes the entire word when using the space after a word with a link #2407

Closed
stirelli opened this issue Nov 21, 2018 · 3 comments
Closed

Comments

@stirelli
Copy link

Quill removes the entire word when using the space after a word with a link

Steps for Reproduction

  1. Visit https://codepen.io/stirelli/pen/GwyWjB
  2. Select the word 'links'
  3. Set a link
  4. 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

@stirelli stirelli changed the title Word removed when using space after a link Quill removes the entire word when using the space after a word with a link Nov 21, 2018
@jaredly
Copy link

jaredly commented Nov 26, 2018

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.

@krogersforbes
Copy link

krogersforbes commented Feb 4, 2019

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.

image

@luin
Copy link
Member

luin commented Jun 23, 2023

Fixed in #3807. Feel free to let me know if there is anything missing. Closing...

@luin luin closed this as completed Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants