apache / cordova

Apache Cordova
https://cordova.apache.org/
584 stars 61 forks source link

How to open system browser from link in the inappbrowser #428

Closed samall76 closed 8 months ago

samall76 commented 8 months ago

I use cordova and the inappbrowser to open a webapplication. In the webapplication I want external links open in the system browser. So the question is how can I open a link from the inappbrowser to the sytem webbrowser.

What I have tried is to run somehting like this in the local cordova index.html. Then a system browser is opened, worked fine. But what I need is to open the system browser while clicking a link in the inappbrowser. What happens is that the links loads over the page in the inappbrowser instead of opening the system browser.

var targetUrl = "https://www.example.com"; var inAppBrowserRef = cordova.InAppBrowser.open(targetUrl, '_system', 'location=yes,hidden=yes,usewkwebview=yes');

I'm using iOS. Can someone give me some pointers how to address this?