Closed Bug 1611594 Opened 4 years ago Closed 4 years ago

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)

72 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1548753

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.

Component: Untriaged → Layout: Generated Content, Lists, and Counters
Product: Firefox → Core

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.

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.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.