empty list items are rendered incorrectly

NEW
Unassigned

Status

()

Core
Layout: Block and Inline
P1
normal
15 years ago
9 months ago

People

(Reporter: Jasper, Unassigned)

Tracking

(Depends on: 2 bugs, {testcase})

Trunk
testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: DUPEME)

Attachments

(2 attachments)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4.1) Gecko/20031008
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4.1) Gecko/20031008

A list with an empty list item, as in the following list:
<ul>
<li>
<li>something
</ul>
Is rendered as a single line with the two bullets on top of each other (this is
especially visible when using ordered lists) in Quirks mode, in Standards mode
it seems to be rendered more or less correct.
A list with an empty list item as in:
<ul>
<li>something
<li>
</ul>
Is rendered as one and a half line in Standards mode and more or less correctly
in Quirks mode (although the spacing after the list is messed up).
I tested this by creating very simply html documents that contain only a couple
of lists (like the ones above) with some text in between. I created them both
with and without doctype to switch between Quirks and Standards mode (Standards
or Almost standards did not seem to make a difference).
Adding a </li> helped in all cases.

Reproducible: Always

Steps to Reproduce:
1. Create an html document containing an ordered or unordered list with one or
more empty <li>'s without </li>'s (and zero or more non-empty <li>'s).
2. View the html document.


Actual Results:  
The list items are partly on top of each other (in what way exactly depends on
the layout mode). 

Expected Results:  
Not show them on top of each other (as it does when you add </li>'s).
(Reporter)

Comment 1

15 years ago
Created attachment 133066 [details]
Testcase with DTD (to let it render with the Standards mode)
(Reporter)

Comment 2

15 years ago
Created attachment 133067 [details]
Testcase without DTD (to let it render in Quirks mode)

This also shows what happens when you add </li>'s (with </li>'s there is no
difference between Quirks mode and Standards mode).

Comment 3

15 years ago
I also see this in the 1.5RC2 build on Win98
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20030925)
Present in Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6b) Gecko/20031208
Keywords: testcase

Comment 5

15 years ago
I get the bug with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b)
Gecko/20040102 Firebird/0.7+

Comment 6

15 years ago
Quirks mode looks good, Standards mode looks screwey

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7a) Gecko/20040113 Firebird/0.8.0+
Whiteboard: DUPEME

Comment 7

15 years ago

*** This bug has been marked as a duplicate of 226880 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE
This bug is older and has better testcases.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
*** Bug 226880 has been marked as a duplicate of this bug. ***
Status: UNCONFIRMED → NEW
Depends on: 194831
Ever confirmed: true
Priority: -- → P1

Comment 10

15 years ago
*** Bug 232853 has been marked as a duplicate of this bug. ***
Blocks: 232853

Comment 11

14 years ago
*** Bug 262051 has been marked as a duplicate of this bug. ***
*** Bug 269745 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 13

13 years ago
Present in Firefox 1.0.4.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511
Firefox/1.0.4
*** Bug 305189 has been marked as a duplicate of this bug. ***

Comment 15

13 years ago
Note that adding </LI> doesn't always fix the issue:
  http://neil.fraser.name/li-bug2.html
Adding any empty tag (e.g. <B></B>) within the <LI></LI> will respawn this bug.

Comment 16

13 years ago
*** Bug 323917 has been marked as a duplicate of this bug. ***

Comment 17

12 years ago
*** Bug 332354 has been marked as a duplicate of this bug. ***

Comment 18

12 years ago
Seeing this also. Additional test cases where it happens and not happens are here:

http://enrogue.com/libug/1.html (bug present)
http://enrogue.com/libug/2.html (bug not present)

The two docs are identical apart from the LI being, in 1.html:
  <li>
  </li>
and in 2.html:
  <li></li>

Comment 19

12 years ago
*** Bug 363167 has been marked as a duplicate of this bug. ***
Duplicate of this bug: 367550

Comment 21

12 years ago
dupe to bug 63741 or bug 179596?
which are older than Felix's bug 194831 could also be duped to one of these?
Duplicate of this bug: 374878

Updated

9 years ago
Duplicate of this bug: 480462

Comment 24

9 years ago
Just found this bug too with the following case:
<li> </li> (space between opening and closing LI)
Assignee: layout.block-and-inline → nobody
OS: Windows XP → All
Hardware: x86 → All
QA Contact: ian → layout.block-and-inline
Depends on: 179596
No longer depends on: 179586
Duplicate of this bug: 1406210
You need to log in before you can comment on or make changes to this bug.