Bug 235066 - REGRESSION(?): Printing PDF from iframe result in blank page
Summary: REGRESSION(?): Printing PDF from iframe result in blank page
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Frames (show other bugs)
Version: Safari 15
Hardware: Mac (Apple Silicon) macOS 12
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-01-11 07:42 PST by cyril
Modified: 2022-01-12 09:32 PST (History)
2 users (show)

See Also:


Attachments
Simple proof of concept to highlight the issue. (167.44 KB, application/zip)
2022-01-11 07:42 PST, cyril
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description cyril 2022-01-11 07:42:34 PST
Created attachment 448847 [details]
Simple proof of concept to highlight the issue.

Programmatically printing a PDF from an iframe result in a blank page. 

You can find an archive attached to this message, on which you can run a web server to reproduce the issue. 

If a `setTimeout` is set (1000ms in the attached example) before the call to `print()`, the 
first attempt works (see `working-print.png` in the attached archive)

However if we click on "cancel", successive attempts result in a blank page, after asking "This web page is trying to print. Do you want to print this web page?". 
(See `failed-print.png` in the attached archive). 

So far I have only reproduced the bug on Safari. I have tested it on last versions of Firefox (95) and Chrome (97) without the bug happening. 

It seems that the bug has been introduced in a recent version of Safari, as it used to work before.
Comment 1 Radar WebKit Bug Importer 2022-01-12 09:32:51 PST
<rdar://problem/87464058>