You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Sergey Grebnov (JIRA)" <ji...@apache.org> on 2015/11/10 15:30:11 UTC

[jira] [Updated] (CB-9573) window.open(url,"_self") for whitelisted url opens InAppBrowser instead of updating current WebView in Android

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

Sergey Grebnov updated CB-9573:
-------------------------------
    Labels: Triaged  (was: )

> window.open(url,"_self") for whitelisted url opens InAppBrowser instead of updating current WebView in Android
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: CB-9573
>                 URL: https://issues.apache.org/jira/browse/CB-9573
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, Plugin InAppBrowser
>    Affects Versions: 5.1.1
>            Reporter: Sebastien Lorber
>              Labels: Triaged
>
> I use 
> - CLI 5.1.1 
> - Android platform 4.0.2 
> - InAppBrowser 1.0.1
> - Crosswalk plugin 1.2.0
> My config.xml contains:
> {code}
>     <access origin="http://*" />
>     <access origin="https://*" />
>     <access launch-external="yes" origin="tel:*" />
>     <access launch-external="yes" origin="geo:*" />
>     <access launch-external="yes" origin="mailto:*" />
>     <access launch-external="yes" origin="sms:*" />
>     <access launch-external="yes" origin="market:*" />
>     <allow-intent href="*" />
> {code}
> Then I run the following code when the app starts:
> {code}
> function deviceReady() {
>     window.open("http://www.google.fr","_self");
> }
> document.addEventListener('deviceready', deviceReady, false);
> {code}
> It opens the InAppBrowser instead of making the WebView navigate to the url. It is not the expected behavior according to the doc:
> bq.  _self: Opens in the Cordova WebView if the URL is in the white list, otherwise it opens in the InAppBrowser.
> If this time I remove the InAppBrowser proxy/wrapper (like mentionned in the doc):
> {code}
> function deviceReady() {
>     delete window.open;
>     window.open("http://www.google.fr","_self");
> }
> document.addEventListener('deviceready', deviceReady, false);
> {code}
> Then it opens the url in the system browser (not sure this is expected either right? but maybe it's Android / Crosswalk webview default anyway...)
> Notice that I absolutly don't want to use in any way the InAppBrowser, I just only need to be able in some cases to use the _system target, that is made available by the InAppBrowser



--
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