"Save PDF before leaving?" dialog not shown if I draw on the PDF without closing the Draw button's menu
Categories
(Firefox :: PDF Viewer, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | affected |
| firefox147 | --- | affected |
| firefox148 | --- | affected |
| firefox149 | --- | affected |
People
(Reporter: cpeterson, Assigned: calixte)
References
Details
Attachments
(3 files)
Steps to reproduce the problem:
- Open a PDF, such as https://www.irs.gov/pub/irs-pdf/f1040.pdf
- Click on the PDF viewer's "Draw" button.
- Draw on the PDF without closing the Draw button's menu.
- Close the tab using Ctrl+W or Cmd+W.
What is the expected behavior?
The PDF tab should show the "Save PDF before leaving?" dialog.
What went wrong?
The PDF tab closes without showing the "Save PDF before leaving?" dialog. See the attached screenshot of the Draw button menu open before I close the tab.
This bug only affects the Draw button. The PDF tab shows the "Save PDF before leaving?" dialog as expected when the Highlight, Text, or Image button menus are open.
| Reporter | ||
Comment 1•6 days ago
|
||
Screenshot of expected "Save PDF before leaving?" dialog when the Draw button menu is closed.
| Reporter | ||
Comment 2•6 days ago
|
||
This bug is a regression from bug 1934672 in Fx 135 (2025-02-04). I can reproduce on Windows and macOS.
I bisected this regression to this mozilla-central pushlog:
| Assignee | ||
Comment 3•6 days ago
|
||
It's because the drawing isn't committed (for example in clicking outside the page).
So on the beforeunload event, we've to end the drawing session.
Comment 4•5 days ago
|
||
(In reply to Calixte Denizet (:calixte) from comment #3)
It's because the drawing isn't committed (for example in clicking outside the page).
So on thebeforeunloadevent, we've to end the drawing session.
We should show the dialog even if there is a drawing session in progress that is not yet committed.
| Assignee | ||
Updated•3 days ago
|
Comment 5•3 days ago
|
||
Description
•