You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 1, 2024. It is now read-only.
In the Android WebViewRenderer, the Navigating event is fired from the ShouldOverrideUrlLoading(AWebView view, string url) method in the WebClient, which seems to get hit when the original URL is redirected or navigation occurs from the initial URL, but not when the original URL begins loading. (This method was also deprecated in API level 24 and replaced with ShouldOverrideUrlLoading(AWebView webView, WebResourceRequest request) .)
The WebClient should instead override the OnPageStarted method and fire the Navigating event there, for consistency with firing the Navigated event from OnPageFinished. This method is hit for initial loads, redirects, and subsequent navigations.
I also believe that WebClient should be moved from a private inner class of the WebViewRenderer to a public class, so that custom renderers can subclass it to inject custom WebViewClients without having to re-implement firing of all the WebView events.
samhouts
added
blocker
Issue blocks next stable release. Prioritize fixing and reviewing this issue.
and removed
blocker
Issue blocks next stable release. Prioritize fixing and reviewing this issue.
labels
Sep 21, 2018
Description
In the Android WebViewRenderer, the Navigating event is fired from the
ShouldOverrideUrlLoading(AWebView view, string url)
method in the WebClient, which seems to get hit when the original URL is redirected or navigation occurs from the initial URL, but not when the original URL begins loading. (This method was also deprecated in API level 24 and replaced withShouldOverrideUrlLoading(AWebView webView, WebResourceRequest request)
.)The WebClient should instead override the
OnPageStarted
method and fire the Navigating event there, for consistency with firing the Navigated event fromOnPageFinished
. This method is hit for initial loads, redirects, and subsequent navigations.I also believe that WebClient should be moved from a private inner class of the WebViewRenderer to a public class, so that custom renderers can subclass it to inject custom WebViewClients without having to re-implement firing of all the WebView events.
https://forums.xamarin.com/discussion/138821/navigating-on-android-webview-doesnt-always-fire
Steps to Reproduce
WebViewAndroid.zip
Expected Behavior
The Navigating event will be fired when the WebView begins loading google.com.
Actual Behavior
The Navigating event is not fired.
Basic Information
The text was updated successfully, but these errors were encountered: