cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-7560) Tel and Mailto links don't work in iframe
Date Tue, 16 Sep 2014 00:30:33 GMT

    [ https://issues.apache.org/jira/browse/CB-7560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14134748#comment-14134748
] 

Shazron Abdullah commented on CB-7560:
--------------------------------------

Great! Yeah I'm thinking of adding a helper function here that will allow mailto and tel protocols,
and if it's any other protocol it will pass it to canHandleRequest

> Tel and Mailto links don't work in iframe
> -----------------------------------------
>
>                 Key: CB-7560
>                 URL: https://issues.apache.org/jira/browse/CB-7560
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 3.5.0
>         Environment: Tested on iPhone 4s running iOS 7
>            Reporter: Nathan Smith
>            Assignee: Shazron Abdullah
>              Labels: iOS7
>
> Tel and Mailto hyperlinks don't work if contained in an iframe.
> The cause of this issue is this line of code: [GitHub|https://github.com/apache/cordova-ios/commit/7e0a32892a540295e7de5da6a4832dfdaf337ac0?diff=unified#diff-8e93b8e59d39213ac17678c5b7470b3cR206].
> It seems that {noformat}[NSURLConnection canHandleRequest:request]{noformat} returns
{{false}} in this case causing the links to not function.
> Example App:
> {code:title=app.html}
> <!DOCTYPE html>
> <html>
>     <head>
>         <meta charset="utf-8"/>
>         <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"/>
>     </head>
>     <body>
>         <a href="tel:041245">Top Level Tel</a>
>         <a href="mailto:example@example.com">Top Level Mailto</a>
>         <iframe src="iframe.html"></iframe>
>         <script type="text/javascript" src="cordova.js"></script>
>     </body>
> </html>
> {code}
> {code:title=iframe.html}
> <!DOCTYPE html>
> <html>
>     <head>
>         <meta charset="utf-8"/>
>         <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"/>
>     </head>
>     <body>
>         <a href="tel:041245">iFrame Tel</a>
>         <a href="mailto:example@example.com">iFrame Mailto</a>
>     </body>
> </html>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message