简体   繁体   中英

iOS 11 - <a href=“tel:1-427-555-05-05”> links only work with long tap on iPhone, single tap doesn't work

Hello StackOverflow community

I am building iOS 11 Swift WKWebView app, currently it is browsing an https remote web site

I've made a phone call page, with html code like

<a href="tel:78122931709">+7 (812) 293-17-09</a>
<a href="tel:78122931709">Make a phone call</a>

But for some reasons, on the iPhone SE under iOS 11.2.6 the tel links are only opened by long tap. For single tap the app does nothing.

On iPad Air 2 under iOS 11.2.6 single tap works, options appear after single tap instantly, not after long tap.

What I want to do is make iPhone app with WKWebView open prompt to call on single tap, not after long tap and choosing first option. Is there any way to do it?

iPhone应用程序屏幕截图1iPhone应用程序屏幕截图2-长按后

iPhone应用程序屏幕截图3-选择第一个选项以拨打电话号码,最后出现通话提示

iPad应用程序屏幕截图1

ipad应用程序屏幕截图2单键点击有效,选项立即显示,无需长按链接

My solution was to switch from using WKWebView to deprecated UIWebView

All telephone phone links work fine on iPhone on UIWebView

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM