[hang] Stuck at Print Preview "Progress:: Preparing..." dialog with onbeforeprint="alert('test')"

REOPENED
Unassigned

Status

()

REOPENED
8 years ago
24 days ago

People

(Reporter: martijn.martijn, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
Created attachment 544475 [details]
testcase

Not a big issue, but something is not completely right in this case.
When going into print preview, an alert comes up and the 'Preparing' dialog stays there. After dismissing those dialogs, you get into the print preview mode, except, the page is not really print previewed, it seems.
(Reporter)

Updated

8 years ago
Blocks: 307258
(Reporter)

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---

Comment 1

10 months ago
What's currently happening is we open another tab for about:printpreview and the Print Preview progress dialog. Meanwhile back in the original document and its tab (which we can't see) there is an alert popup. That modal popup blocks the 'beforeprint' handler from returning, so the progress dialog in about:printpreview is stuck with no indication of why.
Summary: Weird looking print preview with onbeforeprint="alert('test')" → Stuck at Print Preview "Progress:: Preparing..." dialog with onbeforeprint="alert('test')"

Comment 2

10 months ago
It looks like TemporarilyDisableDialogs[1] is what we would like to use to fix this, but that class is MOZ_RAII (stack class only) so we can't just add it as a member to AutoPrintEventDispatcher[2] since we sometimes store our instance of that class.

1. https://dxr.mozilla.org/mozilla-central/rev/c4ebc8c28a33b785dfbfa533810517cc707d1ad0/dom/base/nsGlobalWindowOuter.h#399
2. https://dxr.mozilla.org/mozilla-central/rev/5faab9e619901b1513fd4ca137747231be550def/layout/base/nsDocumentViewer.cpp#411
OS: Windows 7 → All
Hardware: x86 → All
Summary: Stuck at Print Preview "Progress:: Preparing..." dialog with onbeforeprint="alert('test')" → [hang] Stuck at Print Preview "Progress:: Preparing..." dialog with onbeforeprint="alert('test')"
You need to log in before you can comment on or make changes to this bug.