1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Support file save triggered from the Firefox integrated version.

Related to https://bugzilla.mozilla.org/show_bug.cgi?id=1659753

This allows Firefox trigger a "save" event from ctrl/cmd+s or the "Save
Page As" context menu, which in turn lets pdf.js generate a new PDF if
there is form data to save.

I also now use `sourceEventType` on downloads so Firefox can determine if
it should launch the "open with" dialog or "save as" dialog.
This commit is contained in:
Brendan Dahl 2020-08-19 12:19:59 -07:00
parent 10f61b8c96
commit 8023175103
4 changed files with 38 additions and 12 deletions

View file

@ -2541,7 +2541,7 @@ class WorkerTransport {
numPages: this._numPages,
annotationStorage:
(annotationStorage && annotationStorage.getAll()) || null,
filename: this._fullReader.filename,
filename: this._fullReader ? this._fullReader.filename : null,
})
.finally(() => {
annotationStorage.resetModified();