Closed
Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for an issue that matches the one I want to file, without success.
Issue Details
- Electron Version: 5.0.5
- Operating System: macOS Mojave 10.14.5 / Windows too ?
- Last Known Working Electron version: not known
Expected Behavior
When using webContents.print()
, if the user click the cancel button on the print dialog (or on the "PDF" button) this should: return a callback value of "false" (error) or "true" (success), but with more details that only "true" or "false". Something like an error/success message that tell that the cancel button has been clicked..
This could be:
success
when the document is sent to the printercancelled
when the cancel button is clickedpdf
/other-action
? when the PDF button is clickedfailed
when an error occurs
Actual Behavior
In my application, I only want to display a success notification to the user when the print process is successfully launched and an error message when they is an error. For now, false-positive notifications are display when :
- the cancel button is clicked on the print dialog (return is
false
), we do not know if it is anerror
or acancel
event and when an error occurs (return isfalse
too), we do not know if it is anerror
or acancel
event. - the "PDF" button (only on macOS?) is clicked (return is
true
) and we would know if this is a printsuccess
or something else to display a "successfully print" notification to the user.
Not tested, but Windows should have the same problem !
Perhaps linked with #15568 but more specific ?
@codebytere perhaps something that is linked with #17400