Bug 54360 - WebView with flyout menu unable to load on all devices
Summary: WebView with flyout menu unable to load on all devices
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.3
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jimmy [MSFT]
Depends on:
Reported: 2017-03-31 22:45 UTC by James
Modified: 2017-04-11 18:14 UTC (History)
1 user (show)

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

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:

Description James 2017-03-31 22:45:15 UTC
When working with the HybridWebView Xamarin.Forms sample (https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/custom-renderer/hybridwebview/), loading a page with a flyout menu, then opening the flyout menu will result in a completely white screen on some OS versions. This issue appears more common if you rotate the device to landscape mode then open the flyout menu.

The website tested was www.schwans.com

Steps to reproduce
1. Build and deploy sample
2. Tap the hamburger icon to open the menu
3. Observe if menu loads or just becomes a white screen
4. If not, try rotating your device, see if screen still loads.

Expected Behavior- The menu loads
Actual behavior- Screen never loads, and goes completely white.

XTC Tests exhibiting the issue are included, and test results can be found here:

As a test, I created a fresh Xamarin.Forms app in which just used the base WebView renderer, and the issue did not show itself:

Sample project attached, for convenience two apk's are included
HybridWebViewTry1.Droid.apk- The HybridWebView that shows the issue
WebViewApp.Android.apk- The basic Xamarin.Forms app using a vanilla WebView where the issue is not present
Comment 1 James 2017-03-31 22:46:47 UTC
Due to size limits, Sample project with APK's can be found here: https://www.dropbox.com/s/hum8wpckih9xvi2/HybridWebViewTest.zip?dl=0
Comment 2 Jimmy [MSFT] 2017-04-11 18:14:30 UTC
The custom renderer in the HybridWebView guide and sample is a subclass of ViewRenderer<>. However in this case it is recommended to subclass WebViewRenderer directly as doing this does not result in the issue described.