Download, rather than opening, PDF attachments in Firefox (bug 1661259, PR 12286 follow-up)

Unfortunately the work-around implemented in PR 12286 didn't actually work in all cases, please refer to the previous commit messages.
To prevent opening of PDF attachments from being completely broken for some users, we'll simply force-download them for now in MOZCENTRAL-builds to unbreak things. (Given that the "Open with" dialog now features a "Open with Firefox"-option, this is less bad than it previously would've been.)
This commit is contained in:
Jonas Jenwald 2020-08-27 16:01:45 +02:00
parent a23079c2dd
commit 2a0de0b66b

View File

@ -172,6 +172,7 @@ class PDFAttachmentViewer extends BaseTreeViewer {
const element = document.createElement("a");
if (
(typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) &&
PdfFileRegExp.test(filename) &&
!viewerCompatibilityParams.disableCreateObjectURL
) {