I have an unordered list within an ordered list, and the numbering of the ordered list is thrown out of sync (it seems to reset to one more than the number of items in the unordered list.
Categories
(Core :: Layout: Generated Content, Lists, and Counters, defect)
Tracking
()
People
(Reporter: mark.tabet, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:72.0) Gecko/20100101 Firefox/72.0
Steps to reproduce:
I entered an ordered list. The numbering was correct.
Then I embedded an unordered list (of two items) within one of the items above, and the ordered list restarted at 3.
Code is as follows:
<ol>
<li><strong>Anfield</strong></li>
<li>AFC Bournemouth</li>
<li>Arsenal</li>
<ul>
<li>Highbury</li>
<li>The Emirates</li>
</ul>
<li>Aston Villa</li>
<li>Brighton</li>
<li>Burnley</li>
<li>Cardiff</li>
<li>Charlton</li>
<li>Chelsea</li>
<li>Crystal Palace</li>
</ol>
Actual results:
The ordered list was no longer correctly numbered.
Expected results:
The numbering after the sublist ends should resume correctly.
Updated•4 years ago
|
Comment 1•4 years ago
|
||
I've run into the same issue. This site renders correctly in Chrome, but incorrectly in Firefox. The 3rd list item in the ordered list is rendering as a "6" seemingly due to the presence of an unordered list being contained within the second list item.
Comment 2•4 years ago
|
||
So the above html code is invalid, and this was broken by the switching lists to use CSS counters. If you use the same CSS counters in Chromium then it renders as Firefox.
The right thing to do is putting the nested <ul>
inside the <li>
.
That being said, this is being tracked in bug 1548753 and I think given the amount of dupes we should double-think our position on it. But the fastest fix is fixing the markup.
Description
•