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.