Opened 13 years ago
Last modified 13 years ago
#10355 confirmed Bug
Remove link-tag in Image-Dialog when Link is empty
| Reported by: | Alex Schmid | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | General | Version: | 3.0 |
| Keywords: | Webkit | Cc: |
Description
Currently when an Image nested within a link is edited and the link-url becomes empty the image afterwards still is wrapped in an empty <a> - Tag what maybe is not what should happen.
Reproduced on the demo-page, also on nightly, gives something like:
<a href=""><img alt="Saturn V carrying Apollo 11" class="right" src="assets/sample.jpg" /></a>
I changed this behaviour in plugins/image/dialogs/image.js, ca. Line 397ff by removing the linkElement:
//Remove Link, Image exists.
else if ( this.linkEditMode && !this.addLink ) {
editor.getSelection().selectElement( this.linkElement );
editor.insertElement( this.imageElement );
this.linkElement.remove(true); // added
}
Change History (1)
comment:1 Changed 13 years ago by
| Keywords: | Webkit added |
|---|---|
| Status: | new → confirmed |
| Version: | 4.1 → 3.0 |

I can confirm this is happening in Webkit only. Problem can be reproduced from CKEditor 3.0 in both 4.x (v4) and 3.x branches.
To reproduce:
Result: only in Webkit a tag will be left untouched.
NOTE: This isn't related to #10224.