Open Bug 439037 Opened 17 years ago Updated 3 years ago

Wrapping broken with the list item

Categories

(Core :: Layout: Block and Inline, defect)

1.9.0 Branch
x86
Windows XP
defect

Tracking

()

UNCONFIRMED

People

(Reporter: yliang, Unassigned)

Details

(Keywords: testcase)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 The Firefox can wrap well with the following contents: <ol> <li style="display:inline;"> <a style="cursor:pointer;white-space:nowrap;">Allentown</a> </li> <li style="display:inline;"> <a style="cursor:pointer;white-space:nowrap;">Barcelona</a> </li> <li style="display:inline;"> <a style="cursor:pointer;white-space:nowrap;">Boston</a> </li> </ol> But if we write these contents in one line without black space between the LI element, the Firefox can't wrap well. Reproducible: Always
If you take out all the whitespace near the LI and A tags, you just have a bunch of display:inline elements next to each other. They're not list items in any meaningful way once you make them display:inline. Can you attach a simple (but complete) testcase that demonstrates the bug?
The following case can be wrapped well with the IE6, IE7, Firefox 2.0 and Firefox 3.0. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <body style=" margin:0px;"> <table style="border-collapse: collapse; empty-cells: show; height: 0.46875in; width: 0.96875in;" id="AUTOGENBOOKMARK_1"> <col style=" width: 0.96875in;"></col> <tr style=" height: 0.46875in;" valign="top"> <td> <div style=" direction: ltr;"> <ol> <li style="display:inline;"><a style="cursor:pointer;white-space:nowrap;">Allentown</a></li> <li style="display:inline;"><a style="cursor:pointer;white-space:nowrap;">Barcelona</a></li> <li style="display:inline;"><a style="cursor:pointer;white-space:nowrap;">Boston</a></li> </ol> </div> </td> </tr> </table> </body> </html>
The following case can only be wrapped well with the IE, not Firefox. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <body style=" margin:0px;"> <table style="border-collapse: collapse; empty-cells: show; height: 0.46875in; width: 0.96875in;" id="AUTOGENBOOKMARK_1"> <col style=" width: 0.96875in;"></col> <tr style=" height: 0.46875in;" valign="top"> <td> <div style=" direction: ltr;"><ol><li style="display:inline;"><a style="cursor:pointer;white-space:nowrap;">Allentown</a></li><li style="display:inline;"><a style="cursor:pointer;white-space:nowrap;">Barcelona</a></li><li style="display:inline;"><a style="cursor:pointer;white-space:nowrap;">Boston</a></li></ol> </div> </td> </tr> </table> </body> </html>
IE's handling of "display:inline" and "display:block" are known to be wacky. Safari displays the page the same was as Firefox 3. Opera wraps, but because of the "white-space:nowrap" (!!!) rather than because the elements are list items. I don't think this is a bug in Firefox.
Component: General → Layout: Block and Inline
Keywords: testcase
Product: Firefox → Core
QA Contact: general → layout.block-and-inline
Version: unspecified → 1.9.0 Branch
This issue still can be reproduced by removing: style="cursor:pointer;white-space:nowrap;" I'm not sure this is a IE's bug or Firefox's bug. I haven't found the definiton about it in the CSS document.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.