Open
Bug 1428073
Opened 8 years ago
Updated 3 years ago
Outdent list with leading DOM whitespace/linebreak inserts bogus <br>
Categories
(Core :: DOM: Editor, defect, P3)
Tracking
()
UNCONFIRMED
People
(Reporter: ebert, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.39 Safari/537.36
Steps to reproduce:
<div contenteditable="true">
<ol><li>One</li></ol>
<ol><li>Two</li></ol>
</div>
Place the caret in at the start of the 2nd list item with the text "Two" and execute `document.execCommand('outdent')`.
Note: The whitespace between both lists is important, if you reduce the example to not contain any sort of whitespace between them, then the issue no longer occurs.
Full demo at: https://jsfiddle.net/dtdesign2/8n5gav67/
Actual results:
<div contenteditable="true">
<ol><li>One</li></ol>
<br>Two<br>
</div>
Expected results:
<div contenteditable="true">
<ol><li>One</li></ol>
Two<br>
</div>
tl;dr: The first `<br>` shouldn't be there
Updated•8 years ago
|
Priority: -- → P3
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•