Closed
Bug 297658
Opened 20 years ago
Closed 20 years ago
Table TRs and TDs are not re-displayed correctly after style.display=...
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: boris, Unassigned)
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Tested the case with Explorer (5.5, 6), and Mozilla. I guess it's Gecko's fault.
A simple table, of which cells or rows you alter with Javascript by
oObj.style.display='none' or ...='block' (or 'inline'), does not render the
cells correctly.
Very odd results, I added a test file to demonstrate it.
Reproducible: Always
Steps to Reproduce:
1. Create table
2. Create a script that hides and then shows the cells (DOM)
3. Repeat step 2 several times to see a good demonstration.
Actual Results:
Table cells should appear perfectly, as on first render of page
Expected Results:
Cells appearing oddly. It seems that new non-existing cells are added in between
the place where cell was hidden to where it was displayed again. Creates weird
spacing.
Reporter | ||
Comment 1•20 years ago
|
||
View attachment's source to see that nothing peculiar isn't being perform. All
basic and standard code.
Reporter | ||
Comment 2•20 years ago
|
||
View attachment's source to see that nothing peculiar isn't being perform. All
basic and standard code.
Comment 3•20 years ago
|
||
You shouldn't use display='block', but display='table-cell' or
display='table-row' to get it working at least a bit like you would expect.
But when you do that, there is still a bug remaining, the bug I'm duping this
against.
*** This bug has been marked as a duplicate of 97506 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 4•20 years ago
|
||
Hmm, weird I couldn't find the other reports on this... Thought I searched well.
The thing is that 'table-cell' or 'table-row' properties work on Mozilla, but
not on IE (have no idea what about other clients). So to make it cross-browser,
the solution is to use display=''
You need to log in
before you can comment on or make changes to this bug.
Description
•