Im trying to implement a click to call link like this:
<a href="tel:+4912345678912">Tel: +4912345678912</a>
According to developers.google this should be working. It is not automatically clicked, only triggered when the user actually clicks on it. However the navigation is blocked in all major mobile browsers.
Navigation is blocked: tel:+4912345678912
It does work in Chrome Desktop and Samsung Mobile Browser. I also tried redirecting via
window.location.href = 'tel:+4912345678912';
but this leads to the same result.
Any ideas?
Worked it out myself. The problem was that the link was inside an iframe that was appended to the parent page. Changing the <a>
tag to the following solved the issue:
<a target="_parent" href="tel:NUMBER">
If there are multiple nested iframes one might have to use _top
instead of _parent
.