Closed Bug 318425 Opened 19 years ago Closed 19 years ago

Two position:absolute divs within each other cause content not to scroll

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: davedit, Assigned: roc)

References

()

Details

(Keywords: regression, testcase)

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20051129 Camino/1.0+
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20051129 Camino/1.0+

No pages at http://www.cox.com will scroll with the latest trunk builds. You can actually drag the scroll bar up and down, but the page will not move. Problem first showed up in the 11/03/05 trunk build. Works fine in branch builds and Firefox 1.5.

Example picture: http://img309.imageshack.us/img309/7513/freesnap0010cg.png
(Notice how the scroll bar is at the bottom, but the page is not at the bottom)

Reproducible: Always

Steps to Reproduce:
1. Go to http://www.cox.com with a trunk build from 11/03/05+
2. Trying scrolling down the page
3. Nothing will move

Actual Results:  
The page would not move, regardless of what I did.

Expected Results:  
The page should have scrolled.
Trunk only.
Keywords: regression
Version: unspecified → Trunk
Also occurs in Firefox trunk builds starting at 11/03/05. A change between 02-Nov-2005 13:38 and 03-Nov-2005 08:51 seems to have caused this problem.
-> core

Regression window: http://tinyurl.com/86r39
Status: UNCONFIRMED → NEW
Component: General → Layout
Ever confirmed: true
Product: Camino → Core
Looks like bug 227121 is the most likely candidate. Can someone back out those changes and test?

cl
Broken on Windows as well.
Assignee: mikepinkerton → nobody
OS: MacOS X → All
QA Contact: layout
Hardware: Macintosh → All
Summary: Scrolling broken at http://www.cox.com in trunk builds → Two position:absolute divs within each other cause content not to scroll
Attached file Testcase
Testcase showing the problem.

If a div is absolutely positioned with a set height and width and another absolutely positioned div is placed inside of it, and if the content overflows, the second div will not scroll it's content.
(Without checking) this was almost certainly caused by the checkin for bug 227121.  The testcase in that bug, #201495, shows the same issue. The checkin seemed to fix the vertical scrollbar, but locked the horizontal scrollbar.

It's unclear (to me at least) whether it should scroll or not, or of this bug should be INVALID.
I'm pretty sure it should scroll. This is pretty bad. Thankfully it didn't land in FF1.5.
Flags: blocking1.9a1+
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051205 Firefox/1.6a1

I just verified that backing out the patch for bug 227121 does indeed fix this. For what it's worth, I see the same thing when something like <pre><div>content</div></pre> is used. This is non-valid HTML, though, when on the other hand, <div><div></div></div> is probably legal.
Blocks: 227121
Attached patch fixSplinter Review
I'm an idiot. The patch in bug 227121 should not have changed the area we use for the view; that needs to carry on being the frame's overflow area. This patch restores that behaviour and also, for safety's sake, updates the frame overflow area with the adjusted overflow area. This patch fixes this bug and does not regress 227121.
Assignee: nobody → roc
Status: NEW → ASSIGNED
Attachment #205996 - Flags: superreview?(dbaron)
Attachment #205996 - Flags: review?(dbaron)
Attachment #205996 - Flags: superreview?(dbaron)
Attachment #205996 - Flags: superreview+
Attachment #205996 - Flags: review?(dbaron)
Attachment #205996 - Flags: review+
checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Thanks Robert.

I had a question though... I guess this is fixed in the sense that it now works like Firefox 1.5, but is this actually the proper behavior? I noticed a few things on http://www.cox.com :

1) When you start scrolling with a scroll wheel, from the bottom or from the top, the page will begin to scroll a couple of lines but the scroll bar will not initially move until you keep scrolling. If you scroll a couple of lines down from the top using a scroll wheel, you can manage to not move the scroll bar.

2) If you click on the content area and try to scroll down with the down arror, the page will scroll down only one line, and then stop, and the scroll bar will not move.

3) Why is there even a scrollbar to begin with? The page could easily load without a scrollbar (at least on my screen). I gave it a whirl in a Safari, and no scrollbar shows up. It looks as if the scrollbar is cutting off part of the page. If you look at the top right, the link that says Visit My Site goes under the scrollbar, and when you click on the scrollbar arrows at the top, you will intially even get a pointing hand.
(In reply to comment #13)
> 1) When you start scrolling with a scroll wheel, from the bottom or from the
> top, the page will begin to scroll a couple of lines but the scroll bar will
> not initially move until you keep scrolling. If you scroll a couple of lines
> down from the top using a scroll wheel, you can manage to not move the scroll
> bar.
> 

I'm assuming you're seeing two scroll bars. One for the main content area and one for the div which has a set height. The main content area starts scrolling but doesn't have far to go then the div starts scrolling when the content area has scrolled as far as it should. That's expected.

> 2) If you click on the content area and try to scroll down with the down arror,
> the page will scroll down only one line, and then stop, and the scroll bar will
> not move.
> 

This is because you selected the content area which is outside of the div, thus scrolling the content area and not the inner div. To scroll the inner div with the arrow keys, you must select content inside that div (click inside of it).

> 3) Why is there even a scrollbar to begin with? The page could easily load
> without a scrollbar (at least on my screen). I gave it a whirl in a Safari, and
> no scrollbar shows up. It looks as if the scrollbar is cutting off part of the
> page. If you look at the top right, the link that says Visit My Site goes under
> the scrollbar, and when you click on the scrollbar arrows at the top, you will
> intially even get a pointing hand.
> 

Safari (as far as I can tell) is rendering the site incorrectly by not respecting the height of the div. Gecko respects that height and freezes it. That said, IE renders the site as Safari does, not as Gecko does.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: