<LI> under <OL> shows wrong number when there is another <OL> before it
Categories
(Core :: Layout: Generated Content, Lists, and Counters, defect)
Tracking
()
People
(Reporter: jisong, Unassigned)
Details
Attachments
(1 file)
(deleted),
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36
Steps to reproduce:
Try with this html:
<ol>
<li>line 1</li>
<li>line 2</li>
<ol>
<li>line 2.1</li>
</ol>
<li>line 3</li>
</ol>
Actual results:
It shows:
- line 1
- line 2
- line 2.1
- line 3 <----------------------- here it is wrong, it should show "3. line 3"
Expected results:
Tried on IE, Edge, Chrome, got the same expected result:
- line 1
- line 2
- line 2.1
- line 3
Hmm, the bug tool totally masses up my text. Let me describe like this:
Acutal result (I added "|" before each line to avoid markdown auto correct it):
|1. line 1
|2. line 2
| 1. line 2.1
|2. line 3 <----------------------- here it is wrong, it should show "3. line 3"
I tested this issue on:
Windows 10 64bit
Ubuntu 18.04.2 64bit
MacOs 10.14 64bit
Nigthly 70.0a1 affected on all Os
Beta 69.0b10 affected on all Os
Release 68.0.1 affected on all Os
Updated•5 years ago
|
Comment 4•5 years ago
|
||
That is invalid markup, for what is worth, and it behaves the same as CSS counters. The <ol>
should be inside the <li>
.
Comment 5•5 years ago
|
||
(But yeah, this is an issue that we may want to address, depending on how the various spec issues go)
I don't feel this is a dup of 1548753 since this bug doesn't require any CSS style and it can repro with such a common case. I hope this can be fixed asap.
Comment 7•5 years ago
|
||
It is a dupe of that bug, though.
The test-case in bug 1548753 comment 0 doesn't need any CSS either. List items use CSS internally.
The patch regressing both was the switch of list items to CSS counters, as the css-list spec defines. That is why our behavior now matches the behavior of CSS counters.
Maybe I'm missing something ablut how this bug is different to bug 1548753 comment 0 though?
Description
•