Closed
Bug 1430910
Opened 7 years ago
Closed 6 years ago
The 'afterprint' event doesn't fire if there's a <canvas> with mozPrintCallback
Categories
(Core :: Print Preview, enhancement, P3)
Core
Print Preview
Tracking
()
RESOLVED
INVALID
People
(Reporter: jwatt, Unassigned)
References
Details
Attachments
(1 file)
471 bytes,
text/html
|
Details |
The 'beforeprint' event should file to give a print docs a chance to make any changes it wants to make to the document so that it can print better, and 'afterprint' should be sent at a later point once reverting those changes will no longer interfere with the printed output. Other than that, the time spanned by the two events should be as short as possible to avoid any changes made by the 'beforeprint' handler from sticking around unnecessarily long in the original document.
I noticed that for documents that have a canvas with a mozPrintCallback callback 'afterprint' doesn't fire until nsDocumentViewer::Destroy is called on the original document's nsDocumentViewer. That essentially means that 'afterprint' will never be called and the document will be stuck with the 'beforeprint' changes.
![]() |
Reporter | |
Comment 1•7 years ago
|
||
![]() |
Reporter | |
Updated•7 years ago
|
Attachment #8943049 -
Attachment mime type: text/plain → text/html
![]() |
Reporter | |
Comment 2•7 years ago
|
||
Presumably this isn't a problem in general because mozPrintCallback isn't widely used on the Web, and PDF.js (which does use mozPrintCallback) doesn't use beforeprint/afterprint.
![]() |
Reporter | |
Updated•6 years ago
|
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•