xdan / jodit

Jodit - Best WYSIWYG Editor for You
https://xdsoft.net/jodit/
MIT License
1.71k stars 354 forks source link

Edit Link bugg when there is a iframe #1176

Closed Lumartic101 closed 1 week ago

Lumartic101 commented 2 months ago

Jodit Version: 4.2.5

Browser: Chrome OS: Windows Is React App: False Reproduced on xdsoft.net: True

Code

<p>—
    <!-- --> <a href="https://www.gutenberg.org/cache/epub/55/pg55-images.html">The Wonderful Wizard of Oz</a> <em>by L. Frank Baum</em>.
</p>
<div style="padding:56.25% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/1002833698?badge=0&amp;autopause=0&amp;player_id=0&amp;app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture; clipboard-write" style="position:absolute;top:0;left:0;width:100%;height:100%;" title="Every Day's Like This"></iframe></div>
// A *self-contained* demonstration of the problem follows...

Expected behavior: When editing a URL link within the editor, which also contains an iframe elsewhere, pressing "Update" after modifying the link (anchor tag a href) should successfully update the URL.

Actual behavior: However, when an iframe is present anywhere in the editor, updating a link sometimes fails. Even though the link appears to be edited, inspecting the element reveals that the URL has not changed.

junan-trustarc commented 2 months ago

I have same situation, editing url doesn't work at first time if there is iframe. Second try works but always failing at first editing of link. We can easily reproduce in jodit demo page.

  1. Add URL link
  2. Add Iframe(youtube video)
  3. Edit added URL and update text or URL and save (it won't save properly)

image