Bug 140018 - Content of iframe inside absolutely positioned div scrolls to top on reflow, and iframe height shrinks
Summary: Content of iframe inside absolutely positioned div scrolls to top on reflow, ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad iOS 8.1
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-31 11:18 PST by malsup
Modified: 2014-12-31 15:28 PST (History)
3 users (show)

See Also:


Attachments
Contains two files: ios-test.html ios-test2.html ios-test.html is the main file to load in the browser. ios-test2.html is the iframe content source file. (758 bytes, application/zip)
2014-12-31 11:18 PST, malsup
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description malsup 2014-12-31 11:18:09 PST
Created attachment 243851 [details]
Contains two files: 
  ios-test.html
  ios-test2.html

ios-test.html is the main file to load in the browser.

ios-test2.html is the iframe content source file.

Scenario:
    When an iframe with sufficiently long content resides w/in an absolutely positioned div strange behavior occurs when a reflow is triggered near the bottom of the content.  The scroll position of the iframe content gets reset to zero and the height of the iframe itself changes to match its parent.

Attached file: ios-iframe-scroll.zip
    which contains two html files:
       ios-test.html
       ios-test2.html

Steps to repro:
   Load ios-test.html in mobile Safari on iPhone or iPhone simulator.
   Scroll to the bottom of the page and select the last radio button.

Observed behavior:
    You will see that the contents of the iframe automatically scroll to the top and the iframe height changes to no longer account for it's full content.

Expected behavior:
    There should be no change in the scroll position or size of the iframe.

Additional information:
    If you remove the position:absolute style rule on the div the behavior is correct.

Webkit Version: 600.1.4
Browser name: iPhone 12B411 600.1.4
Comment 1 Alexey Proskuryakov 2014-12-31 15:28:29 PST
Possibly a duplicate of bug 139694.