E
E
Eugene Ordinary2018-08-06 19:42:19
JavaScript
Eugene Ordinary, 2018-08-06 19:42:19

Why doesn't the page reload if a window.print dialog is open in a child window?

The page is not reloaded if the window.print() dialog is open in the child window. Also in this case, the code in window.onbeforeunload does not work in the parent window, which should close the child window if the page is reloaded.
Even worse, in Chrome, after pressing the cancel print button, the parent window still reloads, but the encoding flies and scribbles are displayed.
If window.print() is not called in the child window, then there are no such troubles.
How to solve these problems?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
deadem, 2018-08-16
@deadem

Chrome has a bunch of print dialog bugs that haven't been closed in years.
Find the problem you describe and attach the exact replay script, star it and hope they finally fix it this year. But as practice shows, developers are not interested in fixes in this part. Over the past few years, the script blocking when opening window.print has not been fixed. So either put up with it, or switch to a normal browser.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question