Bug 7374 - Links to IDs in absolutely positioned divs with overflow:auto
Summary: Links to IDs in absolutely positioned divs with overflow:auto
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2006-02-19 20:39 PST by Sam Bauers
Modified: 2012-12-26 10:31 PST (History)
2 users (show)

See Also:


Attachments
Reduced test case - Edit: with height of child div at 50% instead of 100% by accident, still causes same result. (8.30 KB, application/xhtml+xml)
2006-02-19 20:40 PST, Sam Bauers
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Bauers 2006-02-19 20:39:04 PST
In the submitted reduced case you will find a group of links at the top of the page that should navigate to the headers in the absolutely positioned content area below.

Instead of scrolling the content div (that has overflow:auto) to place the appropriate heading at the top of the div, it instead scrolls the content div to place the appropriate heading at the top of the browser window (where it is unseen).

Quite simply, in this condition, it does not seem to treat the containing div as the position reference for scrolling.

This situation is only met under this criteria, when divs are nested in this way. The absolutely positioned parent div sets the top and bottom values. The absolutely positioned child div sets it's height to 100% to fill the dynamic parent height completely. Other positioning methods can yield different results, and even work properly.

This bug also seems to exist in the current release of Safari Version 2.0.3 (417.8) as well as the latest nightly build.
Comment 1 Sam Bauers 2006-02-19 20:40:25 PST
Created attachment 6618 [details]
Reduced test case -

Edit: with height of child div at 50% instead of 100% by accident, still causes same result.

Just open the test case in Safari...

Style is in the head.
Comment 2 Joost de Valk (AlthA) 2006-02-20 22:21:20 PST
Confirmed, nice testcase.
Comment 3 Sam Bauers 2006-02-21 16:45:05 PST
Forgot to note, the testcase works as expected in IE6 on windows 2000 and in Firefox 1.5 on Mac OS X
Comment 4 Sam Bauers 2007-03-06 18:02:54 PST
This appears to be fixed in the most recent nightly builds. The reduction and a few other examples now work as expected.

Specifically it works for me now on Version 522+, Build 19955.

I don't know why.
Comment 5 Robert Hogan 2012-12-26 10:31:31 PST
This is working as expected since 2007, so closing.