jQueryPlugins
jQueryPlugins copied to clipboard
printElement does not work in Opera 12
Since Opera 12 printElement does only show a popup with contents but does not print and does not close popup.
- print problem
Seems to be the fact, that print should be called after a delay. That means:
!d.browser.opera ? 'print();' : 'setTimeout("window.print()", 1000);'
should make it.
i solved this issue in printElement 1.2 by changing
html.push('<script type="text/javascript">function printPage(){focus();print();' + ((!$.browser.opera && !opts["leaveOpen"] && opts["printMode"].toLowerCase() == 'popup') ? 'close();' : '') + '}</script>');
to
html.push('<script type="text/javascript">function printPage(){focus();' + ( !d.browser.opera ? 'print();' : 'setTimeout("window.print()", 1000);' ) + (!d.browser.opera && !b.leaveOpen && b.printMode.toLowerCase() === "popup" ? "close();" : "") + "}</script>");
- Not closing popup
After fixing the print() i recognized that the popup does not close after correct printing. Can this be solved?