Layers that consist of tables can be shown but not hidden

RESOLVED DUPLICATE of bug 97874

Status

SeaMonkey
General
--
major
RESOLVED DUPLICATE of bug 97874
17 years ago
14 years ago

People

(Reporter: George Dittmeier, Assigned: asa)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010816
BuildID:    Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010816

If you create a div that consists of a single table and try to 
show/hide that div via javascript, you can show it once, hide it once, but then
never show it again.

Reproducible: Always
Steps to Reproduce:
1.open http://www.datstat.com/mozillabug-1.html
2.click on the link "Hide_Layer" (the layer is hidden)
3.click on Show_Layer (the layer will not come back)

Expected Results:  The layer should be show/hidden whenever the corresponding
link is pressed.
That's a <span>, not a <div>.  This works perfectly well for <div>. For <span>
it's invalid markup and that seems to make us do odd things.

*** This bug has been marked as a duplicate of 97874 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE
(Reporter)

Comment 2

17 years ago
Sorry, don't know why I wrote 'div' where I meant 'span'.  Apologies.
(Reporter)

Comment 3

17 years ago
Please see the new test at http://www.datstat.com/mozillabug-2.html.
This doesn't work with <div> either as illustrated.  What I find most 
interesting, is that when the <div> containing the table is hidden, you can see 
the expansion of the space and when it's shown you can see the collapse of the 
space for the div.  This is opposite to what should be happening yes?

Again, the bug here is that if the div contains a table, things are going 
haywire.  I've ruled out the span issue. Reopening.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Status: UNCONFIRMED → RESOLVED
Last Resolved: 17 years ago17 years ago
Resolution: --- → DUPLICATE
Nope.  Your testcase is buggy:

function showtest(){
    var layer = document.getElementById("TESTSPAN");
    layer.visibility='show';
    layer.style.visibility='visible';
    layer.style.display='inline';
}

The correct value for display here would be "block".  "inline" makes it just
like a <span>, taking us back to bug 97874.  You can't have a block (a table)
inside an inline (a span or <div style="display: inline">) so things break.

Fixing that problem in your JS makes this testcase work correctly.... resolving
as duplicate again, sorry (and good call on reopening, by the way; my initial
analysis was not very clear....).  :)

*** This bug has been marked as a duplicate of 97874 ***
(Reporter)

Comment 5

17 years ago
Excellent.  Thanks for pointing that out.  
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.