cordova-plugin-wkwebview-engine icon indicating copy to clipboard operation
cordova-plugin-wkwebview-engine copied to clipboard

window.open won't work

Open mesqueeb opened this issue 6 years ago • 5 comments

I'm not sure why but as soon as I install this plugin window.open(url, '_blank') and without _blank stops worknig.

I have this in my config.xml

    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-navigation href="*" />

It works without the wkwebview plugin.

Related open issue on apache issue tracker.

mesqueeb avatar Jan 11 '19 08:01 mesqueeb

Is this reproducible in a new, plain Cordova app? A minimal reproduction repository would really help to debug and later fix this issue. More information on how to create one: https://github.com/apache/cordova-contribute/blob/master/create-reproduction.md

janpio avatar Jun 19 '19 17:06 janpio

Same issue. It runs in the background as I can see the events firing, but the window isn't visible. It worked fine without this plugin.

CyberCyclone avatar Dec 19 '19 05:12 CyberCyclone

It appears window.open works if your app uses cordova-plugin-inappbrowser. However, as soon as that plugin is removed, window.open no longer has any effect. (I've recently removed cordova-plugin-inappbrowser from my app since it still uses the deprecated UIWebView.)

noahcooper avatar Jan 02 '20 15:01 noahcooper

i used npm i @zestia/cordova-plugin-wkwebview-engine-windowopen and it worked fine

MiguelQueiroz avatar May 05 '20 01:05 MiguelQueiroz

@janpio I was able to solve my issue as well using the @zestia/cordova-plugin-wkwebview-engine-windowopen

Is this really a cordova issue or cordova-plugin-wkwebview-engine doesn't support window.open?

My project was quite old and was using InAppBrowser previously. The window.open was working at that time. Now with apple's guidelines to depracate UIWebView we upgraded to cordova-plugin-wkwebview-engine and window.open stopped working.

userException avatar Aug 27 '20 13:08 userException

We are archiving this repository following Apache Cordova's Deprecation Policy. We will not continue to work on this repository. Therefore all issues and pull requests are being closed. Thanks for your contribution.

jcesarmobile avatar Jan 08 '23 23:01 jcesarmobile