Open Bug 1528483 Opened 6 years ago Updated 2 years ago

Splitting a contenteditable paragraph can result in duplicate HTML IDs

Categories

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

defect

Tracking

()

Tracking Status
firefox67 --- affected

People

(Reporter: pipcet, Unassigned)

Details

Attachments

(1 file)

Splitting <div contenteditable="true"><span id="x">ab</span></div> between "a" and "b" results in <div><span id="x">a</span></div><div><span id="x">b</span></div>.

This is related to bug 1449874.

There is code (in HTMLEditRules.cpp:SplitParagraph) to avoid the duplicate id when splitting a paragraph tag (e.g. when splitting <div id="x">ab</div>), but it is insufficient to handle this case.

Priority: -- → P3
Attached patch mozilla-1528483-001.diff (deleted) — Splinter Review

This minimal patch seems to fix the example.

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

Attachment

General

Creator:
Created:
Updated:
Size: