I came across what seems like a Chrome 65 bug regarding iframes .
I cannot use the snippet to demonstrate this, so I used this JSFiddle .
The problem is that if iframe is display: none; .print() does not print anything on the specified iframe .
This only happens on Chrome 65, not Chrome 64.
Here is the code:
<iframe id="frame"></iframe> <iframe id="frame2" class="hidden"></iframe> <button class="db">Print without display: none;</button> <button class="dn">Print with display: none;</button> $('.db').on('click',function(){ $('#frame').contents().find('body').append('<p>Test without <code>display: none;</code>!</p>') $('#frame')[0].contentWindow.print(); }); $('.dn').on('click',function(){ $('#frame2').contents().find('body').append('<p>Test with <code>display: none;</code>!</p>') $('#frame2')[0].contentWindow.print(); }); .hidden{ display: none; }
PS: Do not try to edit this in the fragment, iframes do not work inside them.
Zenoo source share