wrong numbering of nested lists
Categories
(Core :: Layout: Generated Content, Lists, and Counters, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | wontfix |
firefox69 | --- | fix-optional |
firefox70 | --- | fix-optional |
People
(Reporter: angelo.borsotti, Unassigned)
References
(Regression)
Details
(Keywords: regression)
User Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0
Steps to reproduce:
Open the following file:
<html>
<body>
<ol>
<li>first</li>
<ol>
<li>first - 1</li>
<li>first - 2</li>
</ol>
<li>second</li>
</ol>
</body>
</html>
Actual results:
The "second" item of the outermost list is numbered "3".
Expected results:
The "second" item of the outermost list should be numbered "2"
Comment 1•5 years ago
|
||
I have reproduced this issue on Mac OS 10.13.6, Windows 10 and Ubuntu 18.04.2 LTS, on Nightly v70.0a1, Beta v69.0b14 and Release v68.0.2.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 2•5 years ago
|
||
This is bug 1548753, markup in comment 0 is invalid (as in, the <ol>
should really be inside the <li>
), but... See there for more details.
If putting <OL> directly under another <OL> is invalid, then Firefox should not generate such structure when call execCommand("indent");
<div contenteditable>
<ol>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ol>
</div>
<button onclick=test()>test</button>
<script>
function test() {
document.execCommand("indent");
}
</script>
Put cursor at "3", then click the button to run execCommand("indent"), Firefox will change the structure to
<ol>
<li>1</li>
<li>2</li>
<ol>
<li>3</li>
</ol>
<li>4</li>
<li>5</li>
</ol>
And in fact, Chrome, IE, Edge have the same behavior for execCommand("indent"), but only Firefox shows wrong number. Then if user creates the content from other browser with <div contenteditable> then show in Firefox, it is still wrong.
Comment 4•3 years ago
|
||
I would like to have this bug reopen. Indeed, Chorme, IE and Firefox all show the expected behavior with nested lists like the example proposed above. Only Thunderbird displays something wrong.
Ex:
<ol>
<li>A</li>
<ol>
<li>B</li>
<li>C</li>
<li>D</li>
</ol>
<li>E</li>
</ol>
Browsers display
1. A
1. B
2. C
3. D
2. E <== Fine!
Thunderbird displays:
1. A
1. B
2. C
3. D
4. E <== No...
Updated•2 years ago
|
Description
•