Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

printElement does not work in Opera 12 #40

Open
ghost opened this issue Sep 13, 2012 · 0 comments
Open

printElement does not work in Opera 12 #40

ghost opened this issue Sep 13, 2012 · 0 comments

Comments

@ghost
Copy link

ghost commented Sep 13, 2012

Since Opera 12 printElement does only show a popup with contents but does not print and does not close popup.

  1. 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>");
  1. Not closing popup

After fixing the print() i recognized that the popup does not close after correct printing. Can this be solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants