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

Crash on pasting of image wrapped into an anchor #655

Closed
0xdeadfa11 opened this issue Mar 9, 2021 · 2 comments
Closed

Crash on pasting of image wrapped into an anchor #655

0xdeadfa11 opened this issue Mar 9, 2021 · 2 comments
Labels
Milestone

Comments

@0xdeadfa11
Copy link

0xdeadfa11 commented Mar 9, 2021

Hi!
It can be reproduced via demo page:

  1. Get rendered minimal content example
<a href="google.com">
  <img src="https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"/>
</a>
  1. Paste it to the demo page
  2. Check console output

Got exception:

Uncaught DOMException: Node.removeChild: The node to be removed is not a child of this node suneditor.min.js:1
    update_image image.js:744
    t image.js:615
    <anonymous> self-hosted:1177
    checkInfo fileManager.js:143
    checkFileInfo image.js:618
    checkFileInfo self-hosted:1177
    _checkComponents core.js:4966
    h history.js:50
    r history.js:117
    (Async: setTimeout handler)
    push history.js:114
    onKeyUp_wysiwyg core.js:6614

which refers to update_image, link processing procedure. It tries to remove contextImage._linkElement from cover. In that case cover is newly created container and doesn't contain contextImage._linkElement, so it causes the exception.

@0xdeadfa11 0xdeadfa11 changed the title Crashing on pasting image wrapped into an anchor Crash on pasting of image wrapped into an anchor Mar 9, 2021
@JiHong88 JiHong88 added the bug label Mar 9, 2021
@JiHong88 JiHong88 added this to the 2.37.0 milestone Mar 9, 2021
JiHong88 added a commit that referenced this issue Mar 9, 2021
@JiHong88 JiHong88 closed this as completed Mar 9, 2021
@JiHong88
Copy link
Owner

The 2.37.0 version has been updated.
If this issue has not been resolved, please reopen this issue.
Thank you.

@0xdeadfa11
Copy link
Author

@JiHong88 , awesome! Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants