diff --git a/src/Uno.UI/UI/Xaml/Controls/WebView/Native/Android/InternalWebClient.Android.cs b/src/Uno.UI/UI/Xaml/Controls/WebView/Native/Android/InternalWebClient.Android.cs index fa89aa4bd0a4..b05311026449 100644 --- a/src/Uno.UI/UI/Xaml/Controls/WebView/Native/Android/InternalWebClient.Android.cs +++ b/src/Uno.UI/UI/Xaml/Controls/WebView/Native/Android/InternalWebClient.Android.cs @@ -2,10 +2,8 @@ using System.Globalization; using Android.Graphics; using Android.Runtime; -using Android.Views; using Android.Webkit; using Microsoft.Web.WebView2.Core; -using Windows.UI.Xaml.Controls; using Windows.Web; namespace Uno.UI.Xaml.Controls; @@ -26,6 +24,16 @@ internal InternalClient(CoreWebView2 coreWebView, NativeWebViewWrapper webViewWr _nativeWebViewWrapper = webViewWrapper; } + public override void DoUpdateVisitedHistory(Android.Webkit.WebView view, string url, bool isReload) + { + base.DoUpdateVisitedHistory(view, url, isReload); + + _coreWebView.DocumentTitle = view.Title; + + _nativeWebViewWrapper.RefreshHistoryProperties(); + _coreWebView.RaiseHistoryChanged(); + } + #pragma warning disable CS0672 // Member overrides obsolete member public override bool ShouldOverrideUrlLoading(Android.Webkit.WebView view, string url) #pragma warning restore CS0672 // Member overrides obsolete member @@ -62,9 +70,6 @@ public override void OnPageFinished(Android.Webkit.WebView view, string url) { _coreWebView.DocumentTitle = view.Title; - _nativeWebViewWrapper.RefreshHistoryProperties(); - _coreWebView.RaiseHistoryChanged(); - var uri = !_nativeWebViewWrapper._wasLoadedFromString && !string.IsNullOrEmpty(url) ? new Uri(url) : null; _coreWebView.RaiseNavigationCompleted(uri, true, 200, CoreWebView2WebErrorStatus.Unknown);