Open Bug 1332924 Opened 9 years ago Updated 3 years ago

[contenteditable] Custom or inline element duplicated when deleting selection that spans different block element types

Categories

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

defect

Tracking

()

People

(Reporter: javan, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Steps to Reproduce: 1. Paste the following Data URI into your address bar: data:text/html;charset=utf-8,<x-foo contenteditable><div>ab</div><p>cd</p></x-foo> 2. Place the cursor before "b" and select through "c" so that both letters are selected 3. Press backspace Expected Results: <x-foo contenteditable> <div>ad</div> </x-foo> Actual Results: <x-foo contenteditable> <div>a</div> </x-foo> <x-foo contenteditable> <p>d</p> </x-foo> Additional details: Enabling dom.webcomponents.customelements.enabled and registering the element with document.registerElement has no affect. The same problem is reproducible using <span contenteditable> as the containing element (instead of <x-foo contenteditable>) so I suspect Firefox treats the contained elements as invalid block children of an inline parent. Styling the container with "display:block;" doesn't help, and in either case the contenteditable element should not be duplicated.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Blocks: 1332973
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: