Table width 100% collapses to minimum after Javascript change to display or visibility

RESOLVED INCOMPLETE

Status

()

--
minor
RESOLVED INCOMPLETE
12 years ago
9 years ago

People

(Reporter: andy, Unassigned)

Tracking

1.5.0.x Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [CLOSEME 5-15-2010])

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7

Table "x" is set to width 100% in css using ID=
parentNode.clientWidth is 600 for example.
Initially, x.clientWidth is 530
following x.style.display='none' to hide it, then show it again
the table has collapsed left-ward to the minimum width, x.clientWidth now 315

I have placed a 1px high Div inside x and now explicitly set the width to 530px using JS. This has fixed the problem.

If this sounds like a bug (DOM re-render ignores table width? display: none collapses element size to zero but ignores width: 100% when display: block is specified?) I'll provide the saved page, it's quite complex unfortunately, 27k of js I'm afraid. but I'll comment all the spots where I've experimented.

works fine in IE/PC

Reproducible: Always

Actual Results:  
100% width becomes minimum width following display: none then display: block

Expected Results:  
Table 100% of parent container regardless of display and/or visibility

The problem occurs in Safari/Mac FF/Mac FF/PC but not IE/PC which suggests something to do with display: block on a table I think.

reporting this anyway.

Comment 1

12 years ago
Created attachment 256338 [details]
Simple tables with buttons for collapse and expand 

I see this bug even when using a colgroup with fixed width. The testcase provides both, fixed width and percental width.
This bug was reported on Firefox 2.x or older, which is no longer supported and will not be receiving any more updates. I strongly suggest that you update to Firefox 3.6.3 or later, update your plugins (flash, adobe, etc.), and retest in a new profile. If you still see the issue with the updated Firefox, please post here. Otherwise, please close as RESOLVED > WORKSFORME
http://www.mozilla.com
http://support.mozilla.com/kb/Managing+profiles
http://support.mozilla.com/kb/Safe+mode
Whiteboard: [CLOSEME 5-15-2010]
Version: unspecified → 1.5.0.x Branch
No reply, INCOMPLETE. Please retest with Firefox 3.6.x or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.