I open a new tab to show the user some info using:
window.open("/Home/Agreement", "_blank");
Inside the Agreement View, I put a button with this JavaScript to close the Popup and return to the main tab:
<button class="btn btn-primary btn-block" onclick="window.close();">
return to home
</button>
This method works well in Desktop and also when viewed through a standalone browser in Mobile, but when users navigate to the main page through embedded Web View in Instagram:
They cannot close the popup tab using the button. The button does nothing... and when they press back on their mobile phone, the main page is refreshed, and form input is lost.