Skip to content

Commit 2a0de0b

Browse files
committed
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.)
1 parent a23079c commit 2a0de0b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

web/pdf_attachment_viewer.js

+1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ class PDFAttachmentViewer extends BaseTreeViewer {
172172

173173
const element = document.createElement("a");
174174
if (
175+
(typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) &&
175176
PdfFileRegExp.test(filename) &&
176177
!viewerCompatibilityParams.disableCreateObjectURL
177178
) {

0 commit comments

Comments
 (0)