Viewport Units are miscalculated after initial load

Originator:jonathan
Number:rdar://13342294 Date Originated:04-Mar-2013 03:57 PM
Status:Open Resolved:
Product:Safari iOS Product Version:iOS 6
Classification: Reproducible:Yes
 
04-Mar-2013 03:57 PM Jonathan Felchlin:
Summary:

When styles are adjusted after initial load, viewport units are being miscalculated. This is most noticeable when rotating an iPad while visiting a page which uses viewport units for layout.

Steps to Reproduce:

Open the attached file in Safari on iOS 6+ and rotate the device after the page loads.

Expected Results:

The red space should exactly fill the viewport. Scrolling should immediately reveal the white content.

Actual Results:

The width stays set at the original width. The height expands drastically, possibly to the size of the original page content.

Regression:

Notes:

This also happens when appending a <style /> tag after the page loads. This instance can be created by running the Modernizr javascript script after the page is loaded.

Modernizr bug report: https://github.com/Modernizr/Modernizr/issues/839

04-Mar-2013 03:57 PM Jonathan Felchlin:
'MobileSafariTest.html' was successfully uploaded

04-Mar-2013 04:13 PM Jonathan Felchlin:
New attachment showing adding style to the header after load, which recreates the issue without rotating the device.

04-Mar-2013 04:13 PM Jonathan Felchlin:
'MobileSafariTest-1.html' was successfully uploaded

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!