fix(pdf): enable printing again

- Regression introduced by sandboxing the pdfjs iframe
This commit is contained in:
Fabrice Mouhartem 2026-05-12 10:12:46 +02:00
parent a27ff8e62f
commit acce881db2
No known key found for this signature in database

View File

@ -120,7 +120,7 @@ var factory = function (Util) {
var iframe = document.createElement('iframe');
if (cfg.pdf.viewer) { // PDFJS
var viewerUrl = cfg.pdf.viewer + '?file=' + url;
iframe.setAttribute('sandbox', 'allow-scripts allow-downloads allow-same-origin');
iframe.setAttribute('sandbox', 'allow-scripts allow-downloads allow-same-origin allow-modals');
iframe.src = viewerUrl + '#' + window.encodeURIComponent(metadata.name);
iframe.onload = function () {
if (!metadata.name) { return; }