Page MenuHomePhabricator

Reference numbers wrong in Firefox when following a list
Closed, ResolvedPublic5 Estimated Story Points

Description

This is likely a bug in Firefox, but I'm reporting it here because it affects VE, and I can't find the root cause which would be necessary for a proper upstream bug report.

When editing an article where an ordinary list (e.g. list of external links) is followed by the list of references, the reference numbers are off by the count of the list before it. E.g. https://de.wikipedia.org/wiki/Vier_Vieren?veaction=edit has 2 external links, the references start with 3. Removing that list makes the references start with 11 instead (there is another list with 10 elements in the article).

I can only reproduce with Firefox, not with other browsers.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I was able to reduce it to a minimal example, and reported this upstream as https://bugzilla.mozilla.org/show_bug.cgi?id=1569886.

matmarex added a project: Upstream.
matmarex subscribed.

I can reproduce. Fascinating.

Screenshots for reference:

Firefox: (incorrect)

image.png (1×1 px, 214 KB)

Opera: (correct)
image.png (1×1 px, 251 KB)

If we needed to work around this, it seems that counter-reset: mw-ref-linkback works correctly when applied to ol.mw-references li:first-child instead of ol.mw-references. But presumably the same issue applies to other counters, and MediaWiki uses this in a bunch of places, so I'd rather see if a Firefox fix is coming soon first.

After reading https://drafts.csswg.org/css-lists-3/#list-item-counter: This might actually be the expected behavior (but I'm not going to encourage Firefox devs by making that comment on Bugzilla), and the correct workaround is counter-reset: mw-ref-linkback list-item.

Change 555905 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Cite@master] Fix broken reference list numbering in Firefox

https://gerrit.wikimedia.org/r/555905

Change 555905 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Fix broken reference list numbering in Firefox

https://gerrit.wikimedia.org/r/555905

awight set the point value for this task to 8.Dec 19 2019, 10:44 AM
awight subscribed.

Assigning random story points, please revise as needed.

awight changed the point value for this task from 8 to 5.Dec 19 2019, 10:45 AM
WMDE-Fisch moved this task from Demo to Done on the WMDE-QWERTY-Sprint-2019-12-11 board.
WMDE-Fisch subscribed.

This seems to be fixed and deployed. I just confirmed using FF and the example link above.

Change 567969 had a related patch set uploaded (by Edward Chernenko; owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Cite@REL1_34] Fix broken reference list numbering in Firefox

https://gerrit.wikimedia.org/r/567969

Change 567969 merged by jenkins-bot:
[mediawiki/extensions/Cite@REL1_34] Fix broken reference list numbering in Firefox

https://gerrit.wikimedia.org/r/567969