Closed Bug 4317 Opened 26 years ago Closed 25 years ago

Absolute positioning on scrolled div's is broken.

Categories

(Core Graveyard :: GFX, defect, P3)

All
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: kmcclusk, Assigned: beard)

Details

If you give a DIV an absolute position the contents of the DIV are displayed in the upper left hand corner of the viewer regardless of the left and top properties. Test case <html> <body> <div style="position:absolute; left:150px; top:150px; width:100px; height:100px; overflow:scroll;"> <p>option 1</p> <p>option 2</p> <p>option 5</p> <p>option 6</p> <p>option 7</p> </body> </html> Note: The scrollbars for this div are displayed at the correct location. Version: March, 26, 1999 build.
Status: NEW → ASSIGNED
Summary: Absolute positioning on div's is broken. → Absolute positioning on scrolled div's is broken.
Updated the summary to reflect that the problem seems to be with scrolled DIV elements only
Weird, with Michael's help we determined that the clip view's widget is positioned wrong. Doing a resize of the window fixes the problem. Kevin, does a resize of the window fix it for you, too?
Assignee: troy → michaelp
Status: ASSIGNED → NEW
Component: Layout → Compositor
Michael, I debugged this a bit and it looks like the problem is in nsScrollingView :: SetPosition(). The call to AdjustChildWidgets() says it is adjusting the positions of the scrollbars and clip view's widget, but it doesn't end up doing that because it passes in "scrolledView" as the "aView" parameter. If I understand the function correctly, it seems we should pass in "this" for the scrolling view instead. I made that change and it fixed the problem, but I'm assigning the bug to you so you can verify whether the fix is correct, and also look at the other calls to AdjustChildWidgets() and see if they are correct
Assignee: michaelp → beard
divvying up michaelp's bugs.
Target Milestone: M6
-> M6
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Target Milestone: M6 → M5
The fix works on Mac as well. Since Michael never objected, it's probably fine.
Status: RESOLVED → VERIFIED
Fixed in April 29th Build.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.