I am using this to open a new tab and then let the controller know the link was accessed:
$("#tosClick").click(function () {
setButtonStatus();
$.get("/Home/DisplayTOS")
.done(function (responseData) {
if (responseData != "") {
var myWindow = window.open(responseData);
$.get("/Home/TOSShown");
}
});
});
where tosClick is <span>Agree to <span class="btn-link" id="tosClick">Terms of Service</span></span>.
In Chrome it opens the new tab, gives it focus, and displays the proper page. If a user goes back to the original tab, it is hung, that is nothing works. The pointer does not change based on what it is over, etc. The user can not enter text, click buttons, or do anything on the page.
Closing the newly opened tab has no effect on the original tab. However, opening the developer tools "frees" the original page and everything works. If the developer tools was open when the second page opens, the same "hang" happens. Closing developer tools has no effect, but re-opening it restores the operation of the original page.
Firefox does not have this behavior. Clicking the link on the page opens the new page and everything on the original page still functions.
What do I need to do to allow a user to click the "Show TOS" span, have a new tab open, and still have the original tab function properly?