0

I am developing a mobile app using PhoneGap/Cordova, such that the app runs in a WebView and the code is HTML + JavaScript + CSS.

I open a new popup window with content from the Internet, using:

window.open("http://example.com");

Inside the popup content, I give the user a "Close" link, using:

window.close();

This all works great, except that the popup seems to open in the external browser, as an additional "tab" to the pre-existing ones (if any). And then closing the popup simply focuses on another old browser tab, rather than back on my original WebView as I need.

Free Bud
  • 746
  • 10
  • 30

1 Answers1

0

After doing some research, a combination of the following 2 links solves the problem completely:

https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html

How to close InAppBrowser itself in Phonegap Application?

Free Bud
  • 746
  • 10
  • 30