Sebastien Lorber created CB-9573:
------------------------------------

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


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

Reply via email to