Opened 14 years ago

Last modified 12 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:1 Changed 13 years ago by Jakub Ś

Link the below code. Link will be wrapped around span tag:

<span style="font-size: 11px;"><img alt="wink" src="/ckeditor%202/plugins/smiley/images/wink_smile.gif" title="wink" /></span>

Now link the below code. Link will be wrapped around img tag:

<span style="font-size: 11px;"><img alt="wink" src="/ckeditor%202/plugins/smiley/images/wink_smile.gif" title="wink" />some text</span>

Reproducible from CKEditor 3.0 in all browsers.

Last edited 12 years ago by Jakub Ś (previous) (diff)

comment:2 Changed 13 years ago by Garry Yao

Do you see a particular reason for not having link around the outsider of content?

comment:3 Changed 12 years ago by Jakub Ś

Status: newconfirmed
Version: SVN (CKEditor) - OLD3.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.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy