Open Bug 669895 Opened 13 years ago Updated 2 years ago

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

Categories

(Core :: Print Preview, defect)

defect

Tracking

()

REOPENED

People

(Reporter: martijn.martijn, Unassigned)

References

Details

Attachments

(1 file)

Attached file 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.
Blocks: 307258
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
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')"
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')"
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: