You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/12/11 03:56:11 UTC
[GitHub] [cordova-plugin-wkwebview-engine] jwasnoggin commented on issue #147: Tel or mailto links not working on WKWebview
jwasnoggin commented on issue #147:
URL: https://github.com/apache/cordova-plugin-wkwebview-engine/issues/147#issuecomment-742951636
Adding this was sufficient for me to get `tel:` links working:
```javascript
document.addEventListener("deviceready", function () {
if (device.platform == 'iOS') {
$(document).on('click', 'a[href^=mailto], a[href^=tel]', function (e) {
e.preventDefault();
var href = $(this).attr('href').replaceAll(' ', ''); // It doesn't like spaces in the phone number
cordova.InAppBrowser.open(href, '_system');
});
}
}, false);
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org