Open Bug 2015385 Opened 6 days ago Updated 3 days ago

"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)

Unspecified
All
defect

Tracking

()

ASSIGNED
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:

  1. Open a PDF, such as https://www.irs.gov/pub/irs-pdf/f1040.pdf
  2. Click on the PDF viewer's "Draw" button.
  3. Draw on the PDF without closing the Draw button's menu.
  4. 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.

Screenshot of expected "Save PDF before leaving?" dialog when the Draw button menu is closed.

See Also: → 2002989

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:

https://hg-edge.mozilla.org/mozilla-central/pushloghtml?fromchange=bde1ea11f25af539acccf38965f2c6c14f4f72d3&tochange=1c85c2eba66da6c4ab20b312efc9b2447bd2a614

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.

Severity: -- → S3
Priority: -- → P3

(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 the beforeunload event, 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: nobody → cdenizet
Status: NEW → ASSIGNED
Priority: P3 → P1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: