Closed
Bug 202432
Opened 21 years ago
Closed 21 years ago
td tags are incorrectly formatted when a row is hidden and then un-hidden using the style object.
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
People
(Reporter: robert, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 When the page first loads, the table format appears correct. Based on user input, pieces of the table are hidden by hiding their rows. When the rows are re-displayed, the tds appear to be appended to the table instead of replacing the placeholder td effectively adding new columns to the table. The page behaves correctly in IE 6.0, but also displays incorrectly in Netscape 7.02. Reproducible: Always Steps to Reproduce: Here's the code: <HTML> <HEAD> </HEAD> <SCRIPT> function HideMe(){ var oHide=document.getElementById("HideMe"); var butHideMe=document.getElementById("butHideMe"); if (oHide.style.display=="none"){ oHide.style.display="inline"; butHideMe.value="Hide"; } else { oHide.style.display="none"; butHideMe.value="Show"; } } </SCRIPT> <BODY> <table border="1"> <tr> <td>Column 1</td> <td>Column 2</td> </tr> <tr id="HideMe"> <td>Column 1</td> <td>Column 2</td> </tr> </table> <input type="button" name="butHideMe" id="butHideMe" value="Hide" onClick="HideMe();"> </BODY> </HTML> Actual Results: Table display was skewed. Expected Results: Re-displayed the columns back in their original places.
Comment 1•21 years ago
|
||
display:inline isn't the proper display for a table row, just take a look at http://www.w3.org/TR/CSS2/visuren.html#propdef-display You can set display=""; to use the default value in IE and Mozila (IE won't recognize most of the display values, specially those related to tables). Invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 2•21 years ago
|
||
According to the W3C's document, the initial value for the display property IS "inline". Just because the default stylesheet overrides it, doesn't mean it shouldn't support it, and nowhere does it say that table rows aren't allowed to have a display setting of inline, or that new rows should be added when the setting is set to inline. If you run the HTML I sent you, you'll see that each time you click on the show button, it displays a new row and a new set of columns, scrolling right down the page. Even if inline isn't proper for rows, this can't be the intended behavior and makes the browser look bad. Essentially, what you've told me is that the browser won't display properly unless everything conforms to its default stylesheet, regardless of W3C specifications. Setting the value to "" does work correctly.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Comment 3•21 years ago
|
||
> nowhere does it say that table rows aren't allowed to have a > display setting of inline, No, but it _does_ say that they are rendered differently if you change them to display:inline (in particular, the cells no longer have to stay inside the row, since the row is now an inline box; an anonymous table and row box are generated inside the inline to hold the cells, and an anonymous table row and table cell are generated around the inline)... That said, the fact that space keeps getting added is in fact a bug. This is basically bug 97506 in reverse (there, we keep creating anonymous tables/table-rows, while here we create anonymous table rows and cells). *** This bug has been marked as a duplicate of 97506 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago → 21 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•