0

In Google Chrome, when a page's child page open the print modal (i.e. window.print() or ctrl+P), the parent page's Ajax calls are completely blocked. I'm wondering how to detect this from parent page.

Once I can detect that my Ajax calls are blocked on my parent page, I can tell the user to close that print modal on child page so that they can use Ajax again on parent page.

Related Info about Chrome's bug:

Chrome browser unable to make a server call when print preview is opened

Google Chrome blocks ajax requests when print preview is opened on child window

https://code.google.com/p/chromium/issues/detail?id=139706

Community
  • 1
  • 1
Arch1tect
  • 4,128
  • 10
  • 48
  • 69
  • You can't. The print dialog (and any system dialog opened by the browser) is modal at the OS level. This means that all processing by the browser stops. No additional code will be executed while that dialog is active. – Rory McCrossan Jun 25 '15 at 19:04
  • @RoryMcCrossan I know little about this modal. But it seems to me that the JavaScript is running fine on parent page. Only the Ajax calls are blocked – Arch1tect Jun 25 '15 at 19:10
  • @RoryMcCrossan For example, I have a button on parent page, when I click it, it fires alert(). The button is still working despite print modal open on child page. – Arch1tect Jun 25 '15 at 19:15

0 Answers0