Closed Bug 1611133 Opened 4 years ago Closed 4 years ago

Firefox(72-0-2) closes automatically after printing.

Categories

(Core :: Print Preview, defect, P3)

72 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla75
Tracking Status
relnote-firefox --- 73+
firefox-esr68 --- unaffected
firefox73 --- verified
firefox74 --- verified
firefox75 --- verified

People

(Reporter: Bkuehlert, Assigned: bdahl)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

Steps to reproduce:

Open Menu/print. A preview appears. If I want to leave the preview I press the X at the top/right of the preview window.

Actual results:

Since some days, perhaps after the last update, Firefox closes automatically and I have to restart it.

Expected results:

Firefox returns back to the website. This was the behaviour in the past.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Printing: Output
Product: Firefox → Core

I can reproduce, running mozregression now.

It's difficult to know exactly what introduced the regression, because there is an initial change that hid that cross:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=1a964a2674d330898518affd0f9de9520b46b1fa&tochange=d967ac6c56aeec99c2fba3814c8550a1c5971384

So, this would be from bug 1492582.

That regression is fixed and the cross re-appears here (and has the new behaviour):
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=3bd8841fab31690f88f9e1475a3a42e5f9780202&tochange=b70e9a9a448663b4f39abf0b222e99a6ba053bf4

So, from bug 1596709.

bdahl - was this change of behaviour for Print Preview deliberate?
I imagine it will confuse/annoy a fair number of people.

Flags: needinfo?(bdahl)

Workaround: install this addon https://addons.mozilla.org/de/firefox/addon/print-print-preview-context/
and print from context menu.

Component: Printing: Output → Print Preview
Status: UNCONFIRMED → NEW
Ever confirmed: true

When print preview loads it adds an onclose attribute to the root element. With a XUL <window> the onclose event is dispatched there. However, with an <html> root the onclose event is dispatched to the JS window object.

I think we need to update all the "onclose" things in https://searchfox.org/mozilla-central/rev/7e92a667e3829831c31e8d46aefe7ef67ad5be1c/toolkit/components/printing/content/printUtils.js#640 to use window.onclose instead.

For HTML documents the onclose event is not dispatched to the root <html>
element.

Assignee: nobody → bdahl
Status: NEW → ASSIGNED
Pushed by bdahl@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ea46ceb69962
Fix print preview close handler. r=bgrins
Keywords: regression
Regressed by: 1492582
Has Regression Range: --- → yes
Priority: -- → P3
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75

Please request uplift when you get a chance.

Flags: qe-verify+

Comment on attachment 9126141 [details]
Bug 1611133 - Fix print preview close handler. r=bgrins

Beta/Release Uplift Approval Request

  • User impact if declined: Close window (the X) in print preview doesn't work as before.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: See comment #1
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Should only change the behavior of print preview.
  • String changes made/needed:
Flags: needinfo?(bdahl)
Attachment #9126141 - Flags: approval-mozilla-beta?

Comment on attachment 9126141 [details]
Bug 1611133 - Fix print preview close handler. r=bgrins

Minor print preview fix which can prevent windows from closing unexpectedly when printing. Approved for 74.0b3.

Attachment #9126141 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment on attachment 9126141 [details]
Bug 1611133 - Fix print preview close handler. r=bgrins

Beta/Release Uplift Approval Request

  • User impact if declined: See previous uplift approval.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: See comment #1
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky):
  • String changes made/needed:
Attachment #9126141 - Flags: approval-mozilla-release?
QA Whiteboard: [qa-triage]

I've managed to reproduce this issue on Firefox 74.0a1 (2020-01-23) using Windows 10x64 by following the STR from comment 0.
This issue is verified fixed on Firefox 74.0b3 and Firefox 75.0a1 (2020-02-13) on the following OSes: Windows 10x64, Windows 7x64 and Ubuntu 18.04x64.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
QA Whiteboard: [qa-triage]

Comment on attachment 9126141 [details]
Bug 1611133 - Fix print preview close handler. r=bgrins

Minor print preview fix which can prevent windows from closing unexpectedly when printing. Approved for 73.0.1.

Attachment #9126141 - Flags: approval-mozilla-release? → approval-mozilla-release+

Added to the Firefox 73.0.1 release notes:

Fixed Firefox unexpectedly exiting when leaving Print Preview mode

This issue is verified fixed on Firefox 73.0.1 on the following OSes: Windows 10x64, Windows 7x64 and Ubuntu 18.04x64.

Flags: in-qa-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: