Javascript window.print() in chrome, closing new window or tab instead of cancelling print leaves javascript blocked in parent window
In the application I work on, we have several different places a user can print from. In all these cases we are using the same workflow of opening a new window(or tab), writing whatever we need to print to the document of the new window, and then we call $(w.document).ready(function () { w.focus(); w.print(); w.close(); }); The issue I'm seeing is that in Chrome, if I close the tab or window that is opened for the print preview instead of clicking the cancel button, Chrome is still blocking the javascript on my parent window. It is similar to the issue described here: Google Chrome blocks ajax