Open softourS opened 4 months ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Can we get a human here?
Experiencing this also, it gets fired when I use out of the box WebView, but doesn't when using custom WebViews with WebViewHandler.
@softourS @kaysho I’m encountering the same issue. Is there a solution available?
@yanhao1115 As far as I am concerned they just don't care
I’m encountering the same issue. Is there a solution available?
Facing the same issue, a fix would be highly appreciated
Any updates on this issue? I'm seeing the same behavior on Android and iOS for both Navigating & Navigated events.
Any news on this? I'm having the same problem with the Navigating and Navigated events on both Android and iOS.
I have the same problem and need to resolve this.
I am recently facing the same issue, any update on this?
We found the issue in our code: We are using a custom NavigationDelegate delegate, that wasn't overriding DidFinishNavigation. We now override this method and call DidFinishNavigation on the NavigationDelegate created by MAUI.
We are now getting the Navigated event on Android and iOS (MAUI Version 8.0.61).
@NcaDev1 thanks for the info! Question: Your work around appears to only be for iOS, is this correct? Also, were you having this problem on Android as well? If so, can you share any details on what you did to address this?
Thanks!
I had this problem too. My handler is only overriding functions "ConnectHandler" and "CreatePlatformView". I solved it like this:
protected override WKWebView CreatePlatformView()
{
var view = new WKWebView(new CoreGraphics.CGRect(), new WKWebViewConfiguration());
view.NavigationDelegate = new MauiWebViewNavigationDelegate(this);
return view;
}
Before i returned unmodified WKWebView.
Description
I think the title explains it all. When using a WebView on Maui and adding the Navigated event, this event is not triggered when is reached. Specifically, it occurs when using WebViewHandlers, or at least it used to work when we used a simple WebView, and after we learned about Handlers instead of Renderers and changed the code accordingly, it stopped working.
We used this sample for an example of Custom WebViewHandler (both iOS and Android): https://github.com/nmoschkin/MAUIWebViewExample.git
It's on the latest version, .net MAUI 8.0 (VS for Mac doesn't tell us more, thank you VS).
Steps to Reproduce
The sample code should suffice but just in case:
1.- Create MAUI app (VS for Mac) 2.- Create both a HybridWebView (inherits from WebView, the example of handlers had View, but that way the WebView did not recognize the .Navigated event as belonging to WebView) and 2 WebViewHandlers (Android & iOS). 3.- On the MainPage, create a variable for the HybridWebView: private static HybridWebView browser = new(); 4.- Add a source (browser = new HybridWebView { Source = url };) on the public MainPage 5.- Add the .Navigated event, like this: browser.Navigated += async (sender, e) => { //Write something here }; 6.- Set a breakpoint inside the event 7.- Nothing happens
Link to public reproduction project repository
https://github.com/softourS/regulares-netmaui-app-public.git
Version with bug
Unknown/Other
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
Android min version 21 to target 34; iOS min version 14 to target 17.2
Did you find any workaround?
Everywhere we search they'd say it's solved, but the issue is usually forgotten or ignored, so no.
Relevant log output
No response