WebView on macOS loads a page but can't navigate within the page. I think it happens when loads a SPA, it always go to home.
Also, first time webview doesn't load the page, always at second time.
It worked OK at 3.0 but the issue happens at 3.1 and upper.
WebView
on a new ContentPage
Source
property with value https://santafepubliclibrary.odilo.us/opac/Navigation.PushAsync
Page loads at first time and be able to navigate inside page, as it does on XF 3.0
Page loads at second time and is not be able to navigate inside page.
The reproduction (which works for the other issue which was reported) actually crashes when trying to navigate back on 3.3 with an NRE. Was anything changed that would cause this?
(Closed by accident)
I've tested again at 3.3 (last stable) and I've found the NRE, it happens when you navigate to page with WebView and click back button fast. Both issues use same WebView and nothing is done when come back.
I think the NRE is related to this other issue: #4001 that has been done at 3.4 #4188
Stack trace of NRE (same as referenced issue):
Object reference not set to an instance of an object
at Xamarin.Forms.Platform.MacOS.WebViewRenderer+FormsWebFrameDelegate.FinishedLoad (WebKit.WebView sender, WebKit.WebFrame forFrame) [0x00017] in <1d80e21b8be74ba38bdf2bd5d3e4d5a0>:0
at (wrapper managed-to-native) AppKit.NSApplication.NSApplicationMain(int,string[])
at AppKit.NSApplication.Main (System.String[] args) [0x00040] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.0.0.0/src/Xamarin.Mac/AppKit/NSApplication.cs:100
at WebViewIssues.macOS.MainClass.Main (System.String[] args) [0x00017] in /Volumes/VMware Shared Folders/Compartido/WebViewIssues/WebViewIssues/WebViewIssues.macOS/Main.cs:11
But I've found that if I wait a bit more and come back, no NRE happens and issue happens as in the description (top/right button in the reproduction)
In 3.0 everything is OK. (also OK in UWP)
I am trying to use WebView in a Xamarin.Mac App and I have also this issue!, cant navigate between pages,
on Xamarin.Forms 3.0 seems to be ok the navigation, but navigating event is never fired, in Xamarin.Forms 3.1 navigating event is fired, but cant navigate between pages.