[Firefox] Block the "load" event until all pages are loaded, to ensure that printing works (bug 1618553)

This commit is contained in:
Jonas Jenwald 2021-02-05 22:00:10 +01:00
parent 094e0b2239
commit 08c23c12dc
2 changed files with 23 additions and 0 deletions

View file

@ -236,6 +236,12 @@ function webViewerLoad() {
}
}
// Block the "load" event until all pages are loaded, to ensure that printing
// works in Firefox; see https://bugzilla.mozilla.org/show_bug.cgi?id=1618553
if (document.blockUnblockOnload) {
document.blockUnblockOnload(true);
}
if (
document.readyState === "interactive" ||
document.readyState === "complete"