зеркало из https://github.com/DeGsoft/maui-linux.git
don't update source property of iOS webview on load if reading local html content (#4468)
This commit is contained in:
Родитель
67cf59b885
Коммит
a732dcc5ee
|
@ -203,6 +203,9 @@ namespace Xamarin.Forms.Platform.MacOS
|
|||
if (Renderer.Control.IsLoading)
|
||||
return;
|
||||
|
||||
if (Renderer.Control.MainFrameUrl == $"file://{NSBundle.MainBundle.BundlePath}/")
|
||||
return;
|
||||
|
||||
Renderer._ignoreSourceChanges = true;
|
||||
Renderer.Element?.SetValueFromRenderer(WebView.SourceProperty, new UrlWebViewSource { Url = Renderer.Control.MainFrameUrl });
|
||||
Renderer._ignoreSourceChanges = false;
|
||||
|
|
|
@ -220,8 +220,12 @@ namespace Xamarin.Forms.Platform.iOS
|
|||
if (webView.IsLoading)
|
||||
return;
|
||||
|
||||
_renderer._ignoreSourceChanges = true;
|
||||
var url = GetCurrentUrl();
|
||||
|
||||
if (url == $"file://{NSBundle.MainBundle.BundlePath}/")
|
||||
return;
|
||||
|
||||
_renderer._ignoreSourceChanges = true;
|
||||
WebView.SetValueFromRenderer(WebView.SourceProperty, new UrlWebViewSource { Url = url });
|
||||
_renderer._ignoreSourceChanges = false;
|
||||
|
||||
|
|
|
@ -218,8 +218,11 @@ namespace Xamarin.Forms.Platform.iOS
|
|||
if (webView.IsLoading)
|
||||
return;
|
||||
|
||||
_renderer._ignoreSourceChanges = true;
|
||||
var url = GetCurrentUrl();
|
||||
if (url == $"file://{NSBundle.MainBundle.BundlePath}/")
|
||||
return;
|
||||
|
||||
_renderer._ignoreSourceChanges = true;
|
||||
WebView.SetValueFromRenderer(WebView.SourceProperty, new UrlWebViewSource { Url = url });
|
||||
_renderer._ignoreSourceChanges = false;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче