SFSafariViewController has incorrect contentInsets and scrollInsets in landscape

Originator:james.reggio
Number:rdar://23706265 Date Originated:12/01/2015
Status:Open/Duplicate Resolved:Duplicate of 22602086
Product:iOS SDK Product Version:iOS 9.1 (13B137)
Classification:UI/Usability Reproducible:Always
 
[Want to discuss? Get in touch with me @jamesreggio.]

When a SFSafariViewController instance is presented in landscape, it becomes impossible to scroll to the bottom of the webpage. Furthermore, the scroll indicators are inaccurately rendered below the bottom of the viewable area.

Steps to Reproduce:
1. Load the app referenced below.
2. Tap the 'Bugs' tab bar item.
3. Tap the 'Content Inset + Landscape Usability Bug' button.
4. Turn the device to landscape.
5. Scroll quickly (flick) to the bottom of the webpage.

Expected Results:
The footer of the page (containing text with 'Running on Google App Engine') should be visible, as well as some padding below.

Actual Results:
The footer of the page is truncated, and can only be seen by 'pulling' the page up from the bottom of the viewable area. (It immediately snaps back to being truncated when you remove your finger from the screen.)

Version:
iOS 9.1 (13B137)

Notes:
The sample project is available on GitHub here:
https://github.com/jamesreggio/SFSafariViewControllerPlayground

Just as in Radar #23706138, I believe that this is the result of incorrect calculations in your code to cleverly show and hide the navigation bar based upon scrolling speed and direction. If you slowly scroll to the bottom of a webpage (in a manner that doesn't case the navigation bar to collapse), this bug does not reproduce.

Configuration:
iPhone 6 on iOS 9.1 (13B137)

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!