You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Shazron Abdullah (Created) (JIRA)" <ji...@apache.org> on 2011/11/28 20:25:43 UTC
[jira] [Created] (CB-33) tel links dont work
tel links dont work
-------------------
Key: CB-33
URL: https://issues.apache.org/jira/browse/CB-33
Project: Apache Callback
Issue Type: Bug
Components: iOS
Reporter: Shazron Abdullah
reported at: https://github.com/callback/callback-ios/issues/29
possibly this happened since ios5,
currently i have this plugin which allows me to make tel links, https://github.com/mcfedr/PhoneGap-ios-PhoneDialer, but there is still the underlying issue which i think might be because of something phonegap does.
a simple phone does nothing and we get an error in the console.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-33) tel links dont work
Posted by "Becky Gibson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13161185#comment-13161185 ]
Becky Gibson commented on CB-33:
--------------------------------
removing this
else if ([[url scheme] isEqualToString:@"tel"])
{
return YES;
}
from - (BOOL)webView:(UIWebView *)theWebView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
in PhoneGapAppDelegate.m solves the problem on iOS5 devices and allows window.location="tel:5551212"; to work.
> tel links dont work
> -------------------
>
> Key: CB-33
> URL: https://issues.apache.org/jira/browse/CB-33
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Reporter: Shazron Abdullah
>
> reported at: https://github.com/callback/callback-ios/issues/29
> possibly this happened since ios5,
> currently i have this plugin which allows me to make tel links, https://github.com/mcfedr/PhoneGap-ios-PhoneDialer, but there is still the underlying issue which i think might be because of something phonegap does.
> a simple phone does nothing and we get an error in the console.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-33) tel links dont work
Posted by "Shazron Abdullah (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13161348#comment-13161348 ]
Shazron Abdullah commented on CB-33:
------------------------------------
@mcfedr
can you provide sample code to repro this, that we can test against definitively as a success criterion.
@becky
the old implementation was hiding the "call confirm" dialog for UIWebview - the code you referenced was to allow that. "tel:" without the "//" is the correct usage according to the spec for URLs since the protocol has no hierarchy (but of course iOS handles either just fine).
> tel links dont work
> -------------------
>
> Key: CB-33
> URL: https://issues.apache.org/jira/browse/CB-33
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Reporter: Shazron Abdullah
>
> reported at: https://github.com/callback/callback-ios/issues/29
> possibly this happened since ios5,
> currently i have this plugin which allows me to make tel links, https://github.com/mcfedr/PhoneGap-ios-PhoneDialer, but there is still the underlying issue which i think might be because of something phonegap does.
> a simple phone does nothing and we get an error in the console.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-33) tel links dont work
Posted by "Becky Gibson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13161253#comment-13161253 ]
Becky Gibson commented on CB-33:
--------------------------------
I tested on an iPhone4S running iOS5 and a 3G running 4.2.1 and I can initiate a phone call via the following:
<div><button onclick="window.location='tel:19783996101';">Call Office (location)</button></div>
<div><a href="tel:9783996101">Call Office (link)</a></div>
<div><button onclick="window.open('tel:19783996101');">Call Office (open)</button></div>
provided a remove the check for "tel" as described above. This code was added on Aug. 30 to fix issue #263
(https://github.com/callback/callback-ios/commit/5ebba48462858e3bdef6a08a120e9213e1fe6662#PhoneGapLib/Classes/PhoneGapDelegate.m)
Unfortunately, the issues in phonegap/phonegap-iphone are turned off so I can't see what problem this code addressed. Shaz, do you have any recollection of the problem? I tried doing a search to see if there was a change in behavior with the iOS 5 SDK but didn't find anything.
> tel links dont work
> -------------------
>
> Key: CB-33
> URL: https://issues.apache.org/jira/browse/CB-33
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Reporter: Shazron Abdullah
>
> reported at: https://github.com/callback/callback-ios/issues/29
> possibly this happened since ios5,
> currently i have this plugin which allows me to make tel links, https://github.com/mcfedr/PhoneGap-ios-PhoneDialer, but there is still the underlying issue which i think might be because of something phonegap does.
> a simple phone does nothing and we get an error in the console.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-33) tel links dont work
Posted by "Becky Gibson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13161256#comment-13161256 ]
Becky Gibson commented on CB-33:
--------------------------------
Wonder if it has something to do with // in the url? see http://stackoverflow.com/questions/8233509/ios-5-tel-link-not-working
> tel links dont work
> -------------------
>
> Key: CB-33
> URL: https://issues.apache.org/jira/browse/CB-33
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Reporter: Shazron Abdullah
>
> reported at: https://github.com/callback/callback-ios/issues/29
> possibly this happened since ios5,
> currently i have this plugin which allows me to make tel links, https://github.com/mcfedr/PhoneGap-ios-PhoneDialer, but there is still the underlying issue which i think might be because of something phonegap does.
> a simple phone does nothing and we get an error in the console.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CB-33) tel links dont work
Posted by "Shazron Abdullah (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-33?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shazron Abdullah resolved CB-33.
--------------------------------
Resolution: Fixed
> tel links dont work
> -------------------
>
> Key: CB-33
> URL: https://issues.apache.org/jira/browse/CB-33
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Reporter: Shazron Abdullah
>
> reported at: https://github.com/callback/callback-ios/issues/29
> possibly this happened since ios5,
> currently i have this plugin which allows me to make tel links, https://github.com/mcfedr/PhoneGap-ios-PhoneDialer, but there is still the underlying issue which i think might be because of something phonegap does.
> a simple phone does nothing and we get an error in the console.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-33) tel links dont work
Posted by "mcfedr (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13159205#comment-13159205 ]
mcfedr commented on CB-33:
--------------------------
ok, sorry, seems i was a bit quick to report this, proper investigation has found this to be a more general problem with using tel links, that there doesn't appear to be a way to do it from javascript.
a regular <a href="tel:123456">call</a> works just fine.
but neither window.location = "tel:123456" or window.open so one cannot do it from javascript.
so this is less of an issue, and what the quoted plugin solves, I think it would be nice to have this built into callback and across all platforms, i don't know what this situation is for other platforms as i have limited access.
> tel links dont work
> -------------------
>
> Key: CB-33
> URL: https://issues.apache.org/jira/browse/CB-33
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Reporter: Shazron Abdullah
>
> reported at: https://github.com/callback/callback-ios/issues/29
> possibly this happened since ios5,
> currently i have this plugin which allows me to make tel links, https://github.com/mcfedr/PhoneGap-ios-PhoneDialer, but there is still the underlying issue which i think might be because of something phonegap does.
> a simple phone does nothing and we get an error in the console.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-33) tel links dont work
Posted by "Shazron Abdullah (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13201539#comment-13201539 ]
Shazron Abdullah commented on CB-33:
------------------------------------
Setting tel links using document.location will not work. The workaround is use this function:
https://gist.github.com/1725083
{code:javascript}
function openInWebView(url)
{
var anchor = document.createElement('a');
anchor.setAttribute('href', url);
anchor.setAttribute('target', '_self');
var dispatch = document.createEvent('HTMLEvents')
dispatch.initEvent('click', true, true);
anchor.dispatchEvent(dispatch);
}
{code}
> tel links dont work
> -------------------
>
> Key: CB-33
> URL: https://issues.apache.org/jira/browse/CB-33
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Reporter: Shazron Abdullah
>
> reported at: https://github.com/callback/callback-ios/issues/29
> possibly this happened since ios5,
> currently i have this plugin which allows me to make tel links, https://github.com/mcfedr/PhoneGap-ios-PhoneDialer, but there is still the underlying issue which i think might be because of something phonegap does.
> a simple phone does nothing and we get an error in the console.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira