Closed Bug 299694 Opened 15 years ago Closed 14 years ago

{inc}Hiding and displaying a large DIV inside two tables with height=100%, tables doesn't schrink when hiding

Categories

(Core :: Layout: Tables, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: kasper, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(2 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050531 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050531 Firefox/1.0+

I have 2 tables, the one inside the other. height=100%. Two DIV's inside the
inner table. One of the DIV's is very high, larger than the browser. The other
is small.
When the page loads, the large div is not displayed (display:none;). When
displaying the large DIV with javascript (...style.display='block';), a
scrollbar appears. When I hide the large DIV again, the scrollbar is still
there. The table is still as large as the large DIV, even though it is not
displayed (hidden with javascript, ...style.display='none';).


Reproducible: Always

Steps to Reproduce:
1.Make 2 tables, height=100%
2.Make 2 DIV's inside the inner table, one larger than the browser, one small.
3.Hide and show the DIV's, and watch the scrollbar.

Actual Results:  
The scrollbar doesn't disappear when I hide the large DIV.

Expected Results:  
Hide the div, schrink the table(s).

Tried in Firefox 1.0.4 and Dear Park (Alpha 1).
Attached file testcase
Just a test case..
Comfirmed with Mozilla suite 200506070105-trunk/Win-2K.
 - Show DIV B => Show DIV A, then outer tabel cell's height is not shrinked.
This phenomenon is observed even when a div with clear:left is added just after
DIV-B in a <TD>. 
 (a) <div style="clear:left;"></div>
 (b) <div style="clear:left;">&nbsp;</div>
 (c) <div style="clear:left;">DIV C</div>
But when I resized window, rendered correctly again in any cases.
 
Status: UNCONFIRMED → NEW
Ever confirmed: true
==> layout
Component: General → Layout: Block and Inline
Keywords: testcase
OS: Windows XP → All
Product: Firefox → Core
QA Contact: general → layout.block-and-inline
Summary: Hiding and displaying a large DIV inside two tables with height=100%, tables doesn't schrink when hiding → {incr}Hiding and displaying a large DIV inside two tables with height=100%, tables doesn't schrink when hiding
Version: unspecified → Trunk
Attached file more minimal testcase (obsolete) —
on load, the testcase's tables display with height ~100px with linux trunk
2005070405, but should be only one line high.
Attached file more minimal testcase
I made the inner table a div, but the outer table has to be a table.

Also, this is standards mode only.  In quirks mode, height: 100% on the outer
table makes it as tall as the window regardless of its contents.
Attachment #188275 - Attachment is obsolete: true
Component: Layout: Block and Inline → Layout: Tables
Attachment #188276 - Attachment mime type: text/plain → text/html
Summary: {incr}Hiding and displaying a large DIV inside two tables with height=100%, tables doesn't schrink when hiding → {inc}Hiding and displaying a large DIV inside two tables with height=100%, tables doesn't schrink when hiding
whats wrong with the more minimal testcase? wfm?
"more minimal testcase" looks the same to me in:
- Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/2006120606 Minefield/3.0a (pre-reflow branch)
- Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/2006120804 Minefield/3.0a1 (post-reflow branch)

the original testcase now renders differently between:
- Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/2006120606 Minefield/3.0a (pre-reflow branch)
- Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/2006120804 Minefield/3.0a1 (post-reflow branch)

Clicking "Show div b" makes div b very tall, and a vertical scrollbar appears in the browser window... clicking "Show div A" restores the div's height and also the box surrounding it, and the vertical scroll bar disappears. 
right.  That's the correct behavior.

The first "more minimal testcase" also got fixed by the reflow branch.
Status: NEW → RESOLVED
Closed: 14 years ago
Depends on: reflow-refactor
Resolution: --- → FIXED
Adding in-testsuite? nomination per bz's request in m.d.t.l. Sorry for the bugspam.
Flags: in-testsuite?
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.