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

Replacing embed isn't removing its content #2285

Closed
makepanic opened this issue Aug 29, 2018 · 7 comments
Closed

Replacing embed isn't removing its content #2285

makepanic opened this issue Aug 29, 2018 · 7 comments

Comments

@makepanic
Copy link

Hi, thanks for this great library.

I've found an issue when replacing an inserted inline embed.
Somehow the embed content isn't "replace" from the quill instance. This means while not visible, it still exists in its content.

Steps for Reproduction

  1. Visit https://codepen.io/makepanic/pen/pOEZZo?editors=0011
  2. Select the embed blot (mention)
  3. Type any text

quill-embed-replace

Expected behavior:
Console (quill.getContents()) should not contain any embed blot information as it's not visible anymore.

Actual behavior:
Console (quill.getContents()) contains any embed blot information

Platforms:
Confirmed to happen in latest Firefox and Chrome

Version:
1.3.6

I'm a beginner to quill so I'm not sure if it's misusing the embed api and this is expected behavior.

@makepanic
Copy link
Author

While working around this issue i found that there's also an empty element in the DOM which maps to the "hidden" embed.

20180904-130947

20180904-130938

@volser
Copy link

volser commented Sep 7, 2018

I think this is similar issue #2187

@furqan56
Copy link

furqan56 commented Dec 7, 2018

I'm facing a similar issue as it doesn't update the content
quill bug 2
However, it works just fine if the user first clicks on the text area then move the cursor left or right and then remove the blot. I even have tried on the above example and it worked
quill-bug

@furqan56
Copy link

furqan56 commented Dec 7, 2018

It doesn't happen all the time it only happens 3/5 times

@jakeboyles
Copy link

+1

@cmrd-senya
Copy link
Contributor

It doesn't happen in the fresh Firefox for me, but still an issue in Chrome. The related bug report in Chrome for this one is https://bugs.chromium.org/p/chromium/issues/detail?id=1063046

@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

6 participants