Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MS Edge - window.print() is not frame contextual in MS edge

Microsoft Edge is not handling window.print() consistently when compared with other browsers.

In most browsers calling window.print() from within an iframe on a page will only print the contents of that iframe. However in edge it will always print the whole document.

Was this intentional? Is there workaround?

Example on JSFiddle.

iframe.html

...
<body>
    <a href="#" onclick="window.print()">print iframe document</a>
</body>
...

index.html

...
<body>
    <a href="#" onclick="window.print()">print outer document</a>
    <iframe src="iframe.html"></iframe>
</body>
...
like image 850
Justin Avatar asked Aug 08 '15 00:08

Justin


1 Answers

This is a confirmed issue with microsoft, quote:

Posted by Microsoft on 7/29/2015 at 12:46 AM
We were able to confirm the issue, and will be working to resolve it in a future release

No workaround exists yet.

like image 69
Dmitry Sadakov Avatar answered Sep 24 '22 00:09

Dmitry Sadakov