Bug 39963 - iOS WebView has wrong scrolling size when loading local html content with images
Summary: iOS WebView has wrong scrolling size when loading local html content with images
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS (show other bugs)
Version: 2.1.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Rui Marinho
URL:
Depends on:
Blocks:
 
Reported: 2016-03-29 09:58 UTC by Stephan Palmer
Modified: 2016-06-01 06:42 UTC (History)
4 users (show)

Tags: ac
Is this bug a regression?: ---
Last known good build:


Attachments
Example project showing the problem (14.38 KB, application/zip)
2016-03-29 09:58 UTC, Stephan Palmer
Details
Example screenshot (27.60 KB, image/png)
2016-03-29 09:58 UTC, Stephan Palmer
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Stephan Palmer 2016-03-29 09:58:24 UTC
Created attachment 15540 [details]
Example project showing the problem

When loading local html content reference a local image, the iOS WebView behaves unexpectedly. In this scenario, it uses a too large scrolling size, and shows an unexpected "unitialized/black area" when scrolling.

In the attached example, it is possible to scroll down or right (depending on device orientation) to show the behaviour. Look at the app class for the relevant code.

In the attached example, the undesired area is always black. I can also reproduce the bug when adding a new WebView to an existing view hierarchy. In that case, the undesired area may show bits and pieces of previously rendered html pages.

The described behaviour does not occur when not loading a local image. Additionally, it does not occur in a custom renderer using UIWebView. So I assume this is related to the WebViewRenderer implementation. When debugging, it seemed to me that the ContentSize of the UIWebView's UIScrollView was incorrect.

I reproduced this bug in the latest Xamarin.Forms 2.1.0.6529, and as arealy as XF 1.3.
I reproduced this bug using iOS 9.2.1 and 8.1.1 using the simulator and real devices.
Xamarin.iOS Version is 9.4.1.25 (Business Edition), Xamarin Studio Version is 5.10.2 (build 56).
Comment 1 Stephan Palmer 2016-03-29 09:58:51 UTC
Created attachment 15541 [details]
Example screenshot
Comment 2 Samantha Houts [MSFT] 2016-04-27 22:39:06 UTC
Should be fixed in 2.3.0-pre1. Thank you!
Comment 3 Parmendra Kumar 2016-04-29 17:18:31 UTC
I have checked this issue with Xamarin.Forms 2.3.0-pre2 and its working fine.

Hence closing this issue.
Comment 4 Stephan Palmer 2016-06-01 06:42:35 UTC
I've tested it with Xamarin.Forms 2.3.0-pre3, and it's working without issue for me too. Thanks!