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
[assembly: ExportRenderer(typeof(CustomWebView), typeof(HybridWebViewRenderer))]
namespace ClotureSiadForms.iOS.Renderer
{
public class HybridWebViewRenderer : WkWebViewRenderer, IWKScriptMessageHandler
{
...
With that CustomWebView class:
public class CustomWebView : WebView
{
public string js="";
public CustomWebView()
{
base.Navigating+= WebViewNavigating; //also tried from xaml
}
public void WebViewNavigating(object sender, WebNavigatingEventArgs args)
{
if (args.Url.StartsWith("tel:"))
{
var tel = args.Url.Split(':')[1];
args.Cancel = true;
Xamarin.Essentials.PhoneDialer.Open(tel);
}
}
}
Steps to Reproduce
Create a hybrid renderer for IOS
Add a Navigating event callback
Navigate to any webpage
Expected Behavior
The WebViewNavigating method should be called on each navigation change
Description
I created a hybrid renderer like that:
With that CustomWebView class:
Steps to Reproduce
Expected Behavior
The WebViewNavigating method should be called on each navigation change
Actual Behavior
WebViewNavigating is never called on IOS
Environment
Show/Hide Visual Studio info
Reproduction Link
https://linkall.pro/bin/ClotureSiadForms-master.zip
The text was updated successfully, but these errors were encountered: