Opened 8 years ago

Last modified 8 years ago

#6856 confirmed Bug

Inserting span tag - wrapped content with insertHTML appends after ending <p> tag instead of inside.

Reported by: Zac Owned by:
Priority: Normal Milestone:
Component: Core : Read-only Version: 3.3
Keywords: Webkit Cc:

Description

Occurs in Safari 5.0.3 for Mac OS 10.6.5

When using the method editor.insertHtml() to insert content that is wrapped in a <span> tag, the content is not inserted into the location where the cursor resides. It inserts the content OUTSIDE of the next available ending </p> tag.

This makes it impossible to insert content wrapped in a span (non-block level) tag on the same line as existing content in the editor.

To replicate:

Use a plugin which installs a menu into the Editor toolbar, such as richcombo plugin. The plugin should use editor.insertHtml() to insert content. The content to be inserted by the menu item should be wrapped in span tags like:

<span>some content</span>

Within a new editor instance, first type a single word but do not hit return. Select the menu item from the toolbar that uses editor.insertHTML() to insert content wrapped in a simple span tag. Notice that the content is inserted on a new line, not next to the word. Click the Source toolbar button. Notice that the span tag is inserted after the closing </p> tag.

Attachments (1)

Screen shot 2010-12-14 at 4.49.24 PM.png (97.9 KB) - added by Zac 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by Zac

comment:1 Changed 8 years ago by Zac

Correction:

This problem only occurs if the span tag contains the attribute contenteditable="false". It does not occur if the span does not include this attribute.

comment:2 Changed 8 years ago by Garry Yao

Component: GeneralCore : Read-only
Keywords: Webkit added
Status: newconfirmed
Version: 3.4.23.3

A browser intrinsic bug unfortunately.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy