Merge pull request #11700 from Snuffleupagus/viewer-JS-warn

Ensure that the JavaScript-warning is always displayed, in the viewer, regardless of browser printing support
This commit is contained in:
Tim van der Meij 2020-03-16 21:47:27 +01:00 committed by GitHub
commit f9ce22c08a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1225,9 +1225,6 @@ const PDFViewerApplication = {
});
pagesPromise.then(async () => {
if (!this.supportsPrinting) {
return;
}
const [openAction, javaScript] = await Promise.all([
openActionPromise,
pdfDocument.getJavaScript(),
@ -1259,6 +1256,9 @@ const PDFViewerApplication = {
}
}
if (!this.supportsPrinting) {
return;
}
if (triggerAutoPrint) {
setTimeout(function() {
window.print();