Closed Bug 432587 Opened 16 years ago Closed 16 years ago

inserthtml command breaks some inline tags into two

Categories

(Core :: DOM: Editor, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: m.kou, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b5) Gecko/2008032619 Firefox/3.0b5
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b5) Gecko/2008032619 Firefox/3.0b5

When the inserthtml command is executed while the caret is inside certain inline tags (e.g. <strong> and <code>), the inline tag is split up into two parts. And the inserted HTML would be in between the two parts, losing the styles given by the inline tag.

Reproducible: Always

Steps to Reproduce:
1. Place the caret inside an inline tag. (<strong>, <code>, <em> etc., <a> doesn't have the problem, strangely.)
2. Run document.execCommand('inserthtml', false, 'e') in the editable area.
Actual Results:  
The 'e' inserted isn't bold, and the <strong> tag in the HTML code is split into two parts.

Expected Results:  
The 'e' should be inserted into the <strong> tag without splitting the tag into two parts.

This bug is causing the bug https://dev.fckeditor.net/ticket/2177 in FCKeditor.
just a quick comment, change the summary to innerHTML, cause thats the name of the property youre looking for and it would make it easier to find!
scratch that misread youre file

:(
fwiw Chrome does the same, gonna check opera later tonight.
Whiteboard: [invalid?]
... and so does Opera.

->INVALID
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
Whiteboard: [invalid?]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: