Skip to content

Commit

Permalink
Download, rather than opening, PDF attachments in Firefox (bug 166125…
Browse files Browse the repository at this point in the history
…9, 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.)
  • Loading branch information
Snuffleupagus committed Aug 27, 2020
1 parent a23079c commit 2a0de0b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions web/pdf_attachment_viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
) {
Expand Down

0 comments on commit 2a0de0b

Please sign in to comment.