Opened 15 years ago
Last modified 13 years ago
#5316 confirmed Bug
Link tag waps span tag when image tag explicitly selected
Reported by: | Richard Cernava | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | Cc: |
Description
When linking an image tag which is wrapped by span tag(s) the link is placed around the span tag(s) rather than the img tag. Unless the span tag has text inside it as well as the img tag, in this case the img tag will only be linked.
Example html: <a href="http://www.google.com"><span style="font-size: 11px;"><img alt="wink" src="/ckeditor%202/plugins/smiley/images/wink_smile.gif" title="wink" /></span></a>
Expected HTML: <span style="font-size: 11px;"><a href="http://www.google.com"><img alt="wink" src="/ckeditor%202/plugins/smiley/images/wink_smile.gif" title="wink" /></a></span>
OS: Mac OS X 10.6.2 Browser: Firefox 3.5.8
Change History (3)
comment:2 Changed 14 years ago by
Do you see a particular reason for not having link around the outsider of content?
comment:3 Changed 13 years ago by
Status: | new → confirmed |
---|---|
Version: | SVN (CKEditor) - OLD → 3.0 |
The problem here is that CKEditor behaviour is inconsistent.
In both cases when you click on image element path is showing that you have selected image (to make sure you can click img on elements path) but only when there is some text in span it doesn't get linked. The same should be made in case of empty span especially that user has selected image and wants only image to be linked.
Link the below code. Link will be wrapped around span tag:
Now link the below code. Link will be wrapped around img tag:
Reproducible from CKEditor 3.0 in all browsers.