Closed Bug 1710887 Opened 4 years ago Closed 4 years ago

Printing an external page without opening it leads to crash of Tab

Categories

(Core :: Printing: Output, defect)

Firefox 88
defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: nils.reibold, Assigned: emilio)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.214 Safari/537.36

Steps to reproduce:

I used Javscript functions for printing as described in:
https://developer.mozilla.org/en-US/docs/Web/Guide/Printing#print_an_external_page_without_opening_it

Actual results:

The printing preview opened. After closing it (cancel / print out) the Tab becomes unresponsive.
This may be connected to the onafterprint event firing already while opening the printing preview.
After page reload the behaviour seemed to be as expected (in another example some JS execution did not work)

Expected results:

After printing / canceling in the printing preview menu the website should still be responsive.

The Bugbug bot thinks this bug should belong to the 'Core::Printing: Output' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

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

I can repro, thanks. Simple example: http://crisal.io/tmp/print-external-page.html

Assignee: nobody → emilio
Status: UNCONFIRMED → NEW
Ever confirmed: true

If afterprint removes the window we're printing, we'd call
LeaveModalState() without a top window, and never leave the modal state.

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c8b0ddb12df7 Make modal state handling in window.print() more reliable. r=smaug
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: