From acce881db22fe80ab2d786b97a6997f4d9d29f1d Mon Sep 17 00:00:00 2001 From: Fabrice Mouhartem Date: Tue, 12 May 2026 10:12:46 +0200 Subject: [PATCH] fix(pdf): enable printing again - Regression introduced by sandboxing the pdfjs iframe --- www/common/media-tag.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/media-tag.js b/www/common/media-tag.js index 29eafdffd..358c99e1b 100644 --- a/www/common/media-tag.js +++ b/www/common/media-tag.js @@ -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; }