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

Timo Ernst commented on CB-10753:
---------------------------------

Argh, you're right. I dug through my code and found deep within this:

{code:javascript}
$(document).on('click', 'a[href^=http], a[href^=https]', function (e) {
  e.preventDefault();
  var $this = $(this),
  target = $this.data('inAppBrowser') || '_blank';
  window.open($this.attr('href'), target, 
'location=no,closebuttoncaption=Fertig,disallowoverscroll=yes,toolbar=yes,enableViewportScale=yes,toolbarposition=bottom');
});
{code}

When I remove this links will not be opened via InAppBrowser.

However, this won't solve my problem. I cannot step into the iframe(s) and do 
the same thing to all links in there as they're hosted on different domains 
(because of same origin policy).

Also, I think that calling window.open(url, '_blank') from within the iframe 
won't open the url via InAppBrowser.

(I don't want the link(s) do be opened in safari browser. I want all links as 
well as all calls to window.open() within iframes opened via InAppBrowser 
layer/view within the app).

> 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
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to