Closed Bug 215842 Opened 22 years ago Closed 22 years ago

[FIX]Javascript resets Fieldset absolute positioning

Categories

(Core :: Layout: Positioned, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: erich, Assigned: caillon)

References

()

Details

(Keywords: testcase)

Attachments

(2 files)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030701 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030701 If you have a javascript that calls getElementById() within a fieldset, any absolutely positioned elements after that javascript will be positioned relative to the window instead of to the fieldset. Reproducible: Always Steps to Reproduce: 1. load the above URL in Navigator 2. load the above URL in Navigator with Javascript disabled, or in Composer 3. notice different positioning of password field Actual Results: The password field is above and to the left of the username field when Javascript is enabled. Expected Results: The password field should be just below the username field, like it is in Composer or when Javascript is disabled.
same in 1.4 on Linux and 20030811 trunk on Windows2000
Attached file Testcase
The element following the <script> is added to the "absoluteList" of Area(html)
Assignee: dom_bugs → position
Component: DOM Level 0 → Layout: R & A Pos
Keywords: testcase
QA Contact: ashishbhatt → ian
Summary: Javascript getElementById() resets Fieldset absolute positioning → Javascript resets Fieldset absolute positioning
Attached patch PatchSplinter Review
The other option is to give the area frame inside the fieldset a special pseudo-element when the fieldset is positioned, and thus give it a style context that sets its position to "relative". That seems too complicated, though...
Attachment #129626 - Flags: superreview?(dbaron)
Attachment #129626 - Flags: review?(dbaron)
Over to caillon, since he's volunteered to drive this in for me in my absence (assuming it gets review, of course).
Assignee: position → caillon
Hardware: PC → All
Summary: Javascript resets Fieldset absolute positioning → [FIX]Javascript resets Fieldset absolute positioning
Attachment #129626 - Flags: superreview?(dbaron)
Attachment #129626 - Flags: superreview+
Attachment #129626 - Flags: review?(dbaron)
Attachment #129626 - Flags: review+
Comment on attachment 129626 [details] [diff] [review] Patch Could this please be approved for 1.5b? Simple change that only affects positioned descendants of positioned fieldsets...
Attachment #129626 - Flags: approval1.5b?
Comment on attachment 129626 [details] [diff] [review] Patch a=asa (on behalf of drivers) for checkin to Mozilla 1.5beta.
Attachment #129626 - Flags: approval1.5b? → approval1.5b+
Checked in for bz, 08/14/2003 17:04.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: