Issue description
There seem to be an issue where the telephone links are automatically calling the number instead of prompting the user beforehand.
Steps to reproduce
- Go to Locations section of the app
var win = Ti.UI.createWindow({backgroundColor : 'white', layout: 'vertical'});
var aWebView = Ti.UI.createWebView({
url: 'http://www.hdsupply.com/locations', top: 25, backgroundColor: 'gray',
});
aWebView.addEventListener('load', function(e) {
Ti.API.info('webview loaded: '+ e.url);
});
win.add(aWebView);
win.open();
- The locations section of the app has a webview. There you can see the html behind the tel: links. Click any tel number. No dialog box is displayed. Right screen of screen shoot attached.
- If you go to
http://www.hdspply.com/locations an iPhone using Safari and the tel: links are prompting me before making the call as they should. Left screen of Screen shoot attached.
Apple docs
"When a user taps a telephone link in a webpage, iOS displays an alert asking if the user really wants to dial the phone number and initiates dialing if the user accepts. When a user opens a URL with the tel scheme in a native app, iOS does not display an alert and initiates dialing without further prompting the user. However, a native app can be configured to display its own alert."
https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html
PR: https://github.com/appcelerator/titanium_mobile/pull/5409 Test code:
PR merged.
Verified the issue. Working fine. Used the below code:
Test Environment: Appc-Studio:3.2.3.201404162038 sdk:3.3.0.v20140417173316 acs:1.0.14 alloy:1.3.1 npm:1.3.2 titanium:3.2.3-beta titanium-code-processor:1.1.1-beta1 xCODE:5.1.1 Device:Nexus5(v4.4.2),Iphone5(v7.1),Samsung Note(v2.3.6) telephone links on webviews prompts user before making the call.