Phone links are not working inside iframe though it does work in div in iOS9 web. how to make phone links make work in iOS9 web?

Hi I was trying phone links inside iframe in iOS9. Phone application doesn't open up in safari in iOS9. When i tried same link inside then it is working there.


I was trying below anchor tag. This code opens up phone application when put inside div. But same code doesn't work inside iframe. Please suggest how does it make to work inside iframes as well?


Please use below code to see phone link outside iframe


<a href = "tel://1-408-555-5555">1-408-555-5555</a>


Please use below code to verify phone link inside iframe.



<iframe id = "test" style = "border:none;"></iframe>

<script>

var iframe = document.getElementById("test");

var iDoc = iframe.contentDocument;

iDoc.write('<a href = "tel://1-408-555-5555">1-408-555-5555</a>');

</script>

Replies

can anyone help here?

Hi,

Even we are facing the same issue. Phone Links are not working inside iframe in iPhone - iOS 9 - Safari.

Below is our sample code that's working in older iOS but not in any of the browsers in iOS 9:

<iframe>

<a href="tel:123456789" target="_blank">Click here to Call</a>

</iframe>


If I remove the target="_blank" , it is working in chrome browser but still not working in safari.


Though it works outside iframe, we cannot let go of the iframe. Is there any work around or fix for this. Any help is much appreciated !

We are also facing problem with iframe, we cant able to fire click/touchstart event.

Confirming that we are also seeing the issue of tel: links not working when inside iframes. The browser does nothing when they are clicked. If you hold down the link, a screen with several options including "Call" is displayed, so the browser does know that they are phone links. I suspect this is some kind of misguided security policy, but it's causing issues for our project. I'm seeing this on iOS 9.1, although I haven't tested extensivly on earlier versions.