htmlreactjsgoogle-chromeweb-applications

Unable to click anything when opening print dialog


I'm working on a web application, which opens a new tab displaying a document or report. In the new tab, there is an option to print the document. When i clicks the print button, the browser’s print dialog appears. When switches back to the original tab without closing the print dialog, I'm unable to interact with the original tab. Not even right click is working.

I'm assuming it is browsers behavior, Please let me know If I'm wrong. Unable to find any resources for my assumption


Solution

  • As part of the HTML standard a browser agent is required to pause when the printer dialog is opened. See: 8.8.2 Printing step 4.

    The reason for this choice is that you don't want the content, of the page to be printed, to change while the print dialog is open.

    This makes clear why the document or report, from which the dialog is opened, is blocked, but it doesn't answer your question why the parent tab is blocked as well. The reason for this is that both tabs, the original, and the document/report one, are part of the same process. Since that process is blocked, both tabs are blocked. On the desktop this is called the Full Site Isolation "site-per-process" Process Model:

    In (one-)site-per-process mode, each process is locked to documents from a single site.

    If you open another windows/tab in Chrome, and browse to another site, you'll notice that that site won't be blocked when you open the print dialog in the document/report of the original site.

    Chrome has a task manager which opens when you hit [Shift + Esc] on the keyboard. There you see which processes are running.