Page MenuHomePhabricator

List entry consisting only of empty list displays without linebreak
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Place
#
#*

on a page (also try pasting multiple instances of this).

What happens?:

overlapping empty list at page end.png (227×399 px, 5 KB)

See https://test.wikipedia.org/wiki/T317991 for a demonstration.

What should have happened instead?:
List should either have extended the page content area or not displayed in the first place (as done with truly empty list items, i.e. ones that don't even contain other empty lists).

Edit: Tested in Firefox 104 on Windows 10, but does not seem to be an issue in Edge 105.

Event Timeline

Hi @1234qwer1234qwer4, thanks for taking the time to report this!
Can confirm in Firefox 105.0.1. Not an issue in Chromium 105.0.5195.125. Resulting HTML:

<ol>
<li><ul><li class="mw-empty-elt"></li></ul></li>
<li>123<ul><li class="mw-empty-elt"></li></ul></li>
<li><ul><li class="mw-empty-elt"></li></ul></li>
<li><ul><li class="mw-empty-elt"></li></ul></li>
</ol>

Not an issue when rendering the HTML outside of MediaWiki.

Within MediaWiki, problem does not happen when removing/disabling the following single line of CSS:

.mw-hide-empty-elt .mw-parser-output:not(.mw-show-empty-elt) .mw-empty-elt {
  display: none;

That code comes from MediaWiki's resources/src/mediawiki.skinning/content.body.less:

	/* body */
	.mw-hide-empty-elt .mw-parser-output:not( .mw-show-empty-elt ) .mw-empty-elt {
	  /*! display: none; */
	}