Bug 16431 - Changing a nested element from position:fixed to position:absolute messes up body.scrollHeight
Summary: Changing a nested element from position:fixed to position:absolute messes up ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2007-12-13 21:18 PST by Khoo Yit Phang
Modified: 2010-06-30 22:11 PDT (History)
1 user (show)

See Also:


Attachments
Test case. (1.33 KB, application/xhtml+xml)
2007-12-13 21:19 PST, Khoo Yit Phang
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Khoo Yit Phang 2007-12-13 21:18:39 PST
In a document that looks like the following:

<div style="height: 100px; position:relative; overflow: auto">
	<div style="position:fixed"/>
</div>

When the inner div is changed to be position:absolute, and offset to something larger than the size of the document (e.g. top:2000px), the document height will be extended to wherever the div was offset to, and the window scrollbars will appear if not already.

It is as if the new document height was calculated without considering overflow: auto in the outer div. The same problem occurs for overflow: none or overflow: scroll too.
Comment 1 Khoo Yit Phang 2007-12-13 21:19:13 PST
Created attachment 17887 [details]
Test case.