Open Bug 926164 Opened 11 years ago Updated 3 years ago

Editor deletes blank before inserted block element when converting to text

Categories

(Core :: DOM: Editor, defect, P5)

24 Branch
x86
Windows XP
defect

Tracking

()

UNCONFIRMED

People

(Reporter: cacyclewp, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

Attached file Testcase
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Firefox/24.0 (Beta/Release)
Build ID: 20130910160258

Steps to reproduce:

1) An edit area contains text with blanks (e.g. a contenteditable div).
2) A block level element is inserted after a blank (either manually or with insertHTML).
3) This block element is selected and converted to text (by setting a range and then using insertHTML). 


Actual results:

Before converting the block to text, the blank is still there for editing. After converting the block element to text, the blank is gone. The blank was, however, NOT part of the manipulated range. This is a serious problem for rich text editors as the text gets corrupted.


Expected results:

The editable text outside the manipulated ranges should be preserved. Chrome does have exactly the same problem.
Component: Untriaged → Editor
Keywords: testcase
Product: Firefox → Core
The blank is conserved as expected when the pasted element is an inline element. It is even conserved when when the inline element is styled as display: block.
This bug is still present in 52.0.1 (!) (Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0) It is still a Major problem as it causes text data corruption!

Bulk-downgrade of unassigned, untouched DOM/Storage bug's priority.

If you have reason to believe, this is wrong, please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: