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

Links on Images duplicating. #840

Closed
OriginalTestUzer opened this issue Aug 1, 2021 · 1 comment
Closed

Links on Images duplicating. #840

OriginalTestUzer opened this issue Aug 1, 2021 · 1 comment
Labels
Milestone

Comments

@OriginalTestUzer
Copy link

Describe the bug
When editing an image with a link, the second time (and subsequent times) clicking submit button tab adds an additional tag prefixed to the existing tag.

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://suneditor.com/sample/index.html
  2. Click on the cat image.
  3. Click on the double cogwheel icon
  4. Select the link tab and type in a URL.
  5. Click submit.
  6. Click on the double cogwheel icon
  7. Click submit.
  8. Look at the code view.

Expected behavior
The existing link tag is updated not a new one prefixed.

Desktop (please complete the following information):

  • OS: Windows
  • Browser chrome
  • Version 92

Additional context
Add any other context about the problem here.

First edit submit click correctly becomes

<div class="se-component se-image-container __se__float-right" contenteditable="false">
  <figure style="margin: auto;">
    <a href="http://suneditor.com/" alt="http://suneditor.com/" data-image-link="image"><img src="http://suneditor.com/docs/cat.jpg" data-align="right" alt="Tabby" data-rotate="" data-proportion="false" origin-size="640,426" data-origin="640,426" data-file-name="cat.jpg" data-file-size="0" data-size="," data-percentage="auto,auto" style="" data-index="0" data-rotatex="" data-rotatey="" data-image-link="http://suneditor.com/">
    </a>
    <figcaption contenteditable="true" style="margin-top: 0px;">
      <p>Insert description</p>
    </figcaption>
  </figure>
</div>

Second submit click makes an error

<div class="se-component se-image-container __se__float-right" contenteditable="false">
  <figure style="margin: auto;">
    <a href="http://suneditor.com/" alt="http://suneditor.com/" data-image-link="image"></a>
    <a href="http://suneditor.com/" alt="http://suneditor.com/" data-image-link="image">
<img src="http://suneditor.com/docs/cat.jpg" data-align="right" alt="Tabby" data-rotate="" data-proportion="false" origin-size="640,426" data-origin="640,426" data-file-name="cat.jpg" data-file-size="0" data-size="," data-percentage="auto,auto" style="" data-index="0" data-rotatex="" data-rotatey="" data-image-link="http://suneditor.com/">
    </a>
    <figcaption contenteditable="true" style="margin-top: 0px;">
      <p>Insert description</p>
    </figcaption>
  </figure>
</div>

Third submit click compounds the error

<div class="se-component se-image-container __se__float-right" contenteditable="false">
  <figure style="margin: auto;">
    <a href="http://suneditor.com/" alt="http://suneditor.com/" data-image-link="image"></a>
    <a href="http://suneditor.com/" alt="http://suneditor.com/" data-image-link="image"></a>
    <a href="http://suneditor.com/" alt="http://suneditor.com/" data-image-link="image">
<img src="http://suneditor.com/docs/cat.jpg" data-align="right" alt="Tabby" data-rotate="" data-proportion="false" origin-size="640,426" data-origin="640,426" data-file-name="cat.jpg" data-file-size="0" data-size="," data-percentage="auto,auto" style="" data-index="0" data-rotatex="" data-rotatey="" data-image-link="http://suneditor.com/">
    </a>
    <figcaption contenteditable="true" style="margin-top: 0px;">
      <p>Insert description</p>
    </figcaption>
  </figure>
</div>

etc..

@JiHong88 JiHong88 added the bug label Aug 5, 2021
@JiHong88 JiHong88 added this to the 2.42.0 milestone Aug 5, 2021
JiHong88 added a commit that referenced this issue Nov 30, 2021
@JiHong88
Copy link
Owner

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

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