Closed Bug 285181 Opened 20 years ago Closed 20 years ago

Embedded javascript and div cause bad cell width

Categories

(Core :: Layout: Tables, defect)

x86
All
defect
Not set
normal

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: jefmyers, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 I've created a test case where a table cell will not be given the proper size when a JavaScript tag shares the cell with a div with the overflow style set to auto. This is only a problem when the JavaScript uses the src attribute to load a file. Using a script inline in the html works fine, as does not setting the div's overflow style. Reproducible: Always Steps to Reproduce: In the test case that'll follow, a table is created with the first column's width set at 75%, the second 25%. Within the left column there's a table with a div with overflow style set to auto. A JavaScript tag is also included in the same table cell as the div. The script's source is specified with the src attribute. The contents of the script are moot (an empty file is fine). Actual Results: The left column of the main table takes up close to 100% of the available width. The right column is squished as small as possible. Expected Results: The left column should take up 75% of the available width, and the right column the remaining 25%. This test case renders properly in IE.
Look for the "problematic line below" comment. Commenting or removing the line will fix the problem. The included script file foo.js is unimportant, just create an empty file with that name, or include some other javascript source file.
I can reproduce the bug in Firefox 1.0.1 on Linux but not in Mozilla 2005-03-07-05 trunk Linux. Jeff, please try a recent trunk build and see if that fixes the problem: http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/ http://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/latest-trunk/
Keywords: testcase
OS: Windows XP → All
The testcase functions properly with mozilla-win32-installer.exe 06-Mar-2005 and firefox-1.0+.en-US.win32.installer.exe 07-Mar-2005. Thanks.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: