Opened 12 years ago
Last modified 12 years ago
#10464 confirmed Bug
[IE] onDelete of Image not removing the Link
Reported by: | Deb | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.0 Beta |
Keywords: | IE | Cc: |
Description (last modified by )
I am adding link to an image in editor, but when i select the image and press delete key, its removing Image but its not removing anchor tag outside the image which is store in owner doc. so if I tried to ad another image in the same place it adding with the old anchor tag.
what I want is, when i select an image and delete it using delete key, I want to delete the anchor tag related to that image tag. Any possibilities? Any event to control that?
Edit:
To reproduce:
- In IE, clear editor contents, paste below code in source and switch to wysiwyg
<p><a href="http://google.com"><img alt="Saturn V carrying Apollo 11" id="aa" src="assets/sample.jpg" /></a></p>
- Select image and remove it with Delete key
- Click in line where image was. Now element's path should show "p a"
- Insert new image - it gets inserted into link.
There is definitely browser incompatibility but this is rather low priority issue as user can remove image and link by clicking “a” on elements path, remove link using context menu or pressing delete before inserting new image.
Change History (2)
comment:1 Changed 12 years ago by
Keywords: | Delete Image removed |
---|
comment:2 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Keywords: | IE added |
Status: | new → confirmed |
Summary: | onDelete of Image not removing the Link → [IE] onDelete of Image not removing the Link |
Version: | 3.6.6 (SVN - trunk) → 4.0 Beta |
Ok so ha have got like two use cases here. User wants to delete image and insert new one into existing link (rather rare) or delete both.
After consulting this issue I know we should take second approach as editor should not
leave empty inline elements in editor.
As I have written few times this is low priority concerning browser incompatibility issue as there are 3 ways to remove link.
Problem can be reproduced in all versions of IE from CKEditor 4.0 beta (in v3 it didn’t work in any browser).
I think best solution will be upgrading to version 4.1.1. I have checked this issue and it seems to be working fine there except in IE.
While other browsers remove empty tag a at once, IE leaves empty a tag but you have to click few times in line in order to get into a tag once more.
This may seem like a problem but IMHO it isn't. When clicking on image elements’ path, it shows exactly where you are and you can click “a” to select “a” tag and remove it. Another option is using right-click menu to remove link before deleting image. What I'm trying to say is when you select image to remove editor should not remove wrapping tags as well.
The only thing I’m unsure about is this empty inline tags removal. In all other browsers “a” tag is removed (can be checked with Firebug for example) but in IE “a” tag stays and get removed when dataProcessor is called.
Comments are welcome:)