The-White-Fang opened a new issue #1341:
URL: https://github.com/apache/cordova-android/issues/1341


   # Bug Report
   
   ## Problem
   `window.open(url, '_system')` opens the `url` in webview.
   
   ### What is expected to happen?
   The URL should open in the system's default browser.
   
   
   ### What does actually happen?
   The URL opens in the same system webview.
   
   
   ## Information
   <!-- Include all relevant information that might help understand and 
reproduce the problem -->
   I recently moved to android 10 as it is required by google play to upload 
the builds with minimum target api of 30 i.e. Android 10. Earlier I was using 
window.open to open some pages that I didn't want to open in main webview and 
that were not supported by the inappbrowser. After upgrading to 10, I noticed 
it no longer works.
   
   
   ### Command or Code
   beforeload = (params, callback) => {
           if (params.url.startsWith('https://api.whatsapp.com/')) {
                window.ref.executeScript({ code: 'window.location.href = "/"' 
});
                window.open(params.url, '_system');
           } else {
                callback(params.url);
           }
   };
   
   ### Version information
   <!--
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   cordova: 10.0.0
   android: 10.1.0
   target api: 30
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [ x] I searched for existing GitHub issues
   - [ x] I updated all Cordova tooling to most recent version
   - [ x] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to