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:
commit
f9ce22c08a
@ -1225,9 +1225,6 @@ const PDFViewerApplication = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
pagesPromise.then(async () => {
|
pagesPromise.then(async () => {
|
||||||
if (!this.supportsPrinting) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const [openAction, javaScript] = await Promise.all([
|
const [openAction, javaScript] = await Promise.all([
|
||||||
openActionPromise,
|
openActionPromise,
|
||||||
pdfDocument.getJavaScript(),
|
pdfDocument.getJavaScript(),
|
||||||
@ -1259,6 +1256,9 @@ const PDFViewerApplication = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this.supportsPrinting) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (triggerAutoPrint) {
|
if (triggerAutoPrint) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
window.print();
|
window.print();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user