You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "jcesarmobile (JIRA)" <ji...@apache.org> on 2016/03/09 20:06:40 UTC

[jira] [Closed] (CB-10753) InAppBrowser will not work with iframe embedded

     [ https://issues.apache.org/jira/browse/CB-10753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jcesarmobile closed CB-10753.
-----------------------------
    Resolution: Won't Fix
      Assignee: jcesarmobile

Sorry but we won't fix this.

Right now it works like on any webview, if you use an iframe and click a link it will be opened on the whole webview, not on the iframe.
And iframes can't execute cordova plugins.

Your options are:
- Stop using iframes, it's a security risk.
- Add <allow-intent href="http://*/*" /><allow-intent href="https://*/*" /> to your config.xml. It won't open the inAppBrowser, but at least will open safari browser instead of replacing your webview content, and on iOS 9 apple added a button to go back, so the user experience isn't that bad.
- Do some research, there are some workarounds to execute cordova plugins from iframes, and there are ways of injecting javascript on the iframe so you can override the link behaviour to open in the inAppBrowser with a similar code to the one you posted.

> InAppBrowser will not work with iframe embedded
> -----------------------------------------------
>
>                 Key: CB-10753
>                 URL: https://issues.apache.org/jira/browse/CB-10753
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS, Plugin InAppBrowser
>            Reporter: Timo Ernst
>            Assignee: jcesarmobile
>
> When a Cordova app has an iframe within its index.html page and this iframe has a link with target set to "_blank", then InAppBrowser will not open a new webview layer. Instead, the whole root webview of the app will be redirected to the url set in the link and there is no way back! This is a true nightmare and needs to be fixed.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org