Closed Bug 145541 Opened 24 years ago Closed 23 years ago

absolute positioned div are displayed incorrectly if top: auto and overflow: auto

Categories

(Core :: Layout, defect, P1)

defect

Tracking

()

RESOLVED DUPLICATE of bug 145212
Future

People

(Reporter: sroland, Assigned: roc)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0rc2) Gecko/20020510 BuildID: 2002051006 If a div is positioned absolute and it has set top to "auto" (or not set at all), and overflow to either "scroll" or "auto", it will not get displayed correctly. If the text in the div is small enough so that no scrollbars appear, nothing will be shown on screen, if the box has scrollbars the box itself is drawn but not the content of the box. If there are links in the content, they can be clicked however (if you hover over the non-visible link, mozilla will show it in the status bar). Reproducible: Always Steps to Reproduce: 1. Open the testcase Actual Results: Nothing can be seen. If the window is small enough, a yellow box is shown without content in the lower left edge. If you move the mouse over that area (regardless if the box is shown or not) you will notice there's a link in it. Expected Results: The div should be drawn correctly, i.e. the same as if overflow is set to "hidden" or "visible".
Attached file testcase
Excellent testcase! As a note, this works correctly for position:fixed, which is a little surprising. I bet this is related to bug 99978
Status: UNCONFIRMED → NEW
Depends on: 99978
Ever confirmed: true
I've just noticed that on solaris the testcase has a bit a different outcome. Instead of showing nothing, the box is shown at the top left edge instead, if the scroller doesn't appear. The link in the div is now both in the box at the top and (invisible) at the bottom. If the window is small enough so the scroller appears, the box is effectively doubled - one shows up at the top (with content, without scrollbar), one at the bottom (only with invisible content, but with the scrollbar). (Can't test this myself unfortunately on solaris with 1.0rc2, just 1.0rc1.). As Boris Zbarsky mentioned, it works with position:fixed - at least almost: the div is shown at the correct place, but it flickers at the top left edge if the scroller is moved (looks the same as in <a href="show_bug.cgi?id="132337">bug 132337</a>)
Priority: -- → P1
Target Milestone: --- → Future
More likely a view problem than layout.
Assignee: attinasi → roc+moz
Component: Layout → Views
I'd say this is more likely layout, since the view system doesn't know anything about "top: auto".
Feel free to give this to "attinasi's list", or perhaps to bz, or to me, if you really want to.
Component: Views → Layout
*** This bug has been marked as a duplicate of 145212 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: