Issue 60900 in chromium: popups with <body onLoad="window.print();window.close()"> doesn't print

79 views
Skip to first unread message

chro...@googlecode.com

unread,
Oct 27, 2010, 6:50:15 AM10/27/10
to chromi...@chromium.org
Status: Unconfirmed
Owner: ----
Labels: Type-Bug Pri-2 Area-Undefined

New issue 60900 by simon.pessemesse: popups with <body
onLoad="window.print();window.close()"> doesn't print
http://code.google.com/p/chromium/issues/detail?id=60900

Chrome Version : 7.0.517.41 (Build officiel 62167)
URLs (if applicable) : http://pessemesse.free.fr/base.html
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Firefox 3.x: OK
Epiphany: OK
Chrome 6: OK


What steps will reproduce the problem?
1. go to http://pessemesse.free.fr/base.html
2. Click on IMPRIMER
3. The popup open and close without printing

What is the expected result?
It should show the printer dialog

What happens instead?
It close the popup

Please provide any additional information below. Attach a screenshot if
possible.
If you go directly to http://pessemesse.free.fr/popup.html it works.

Attachments:
popup.html 72 bytes
base.html 878 bytes

chro...@googlecode.com

unread,
Nov 1, 2010, 11:22:19 AM11/1/10
to chromi...@chromium.org

Comment #1 on issue 60900 by staticc3333: popups with <body
onLoad="window.print();window.close()"> doesn't print
http://code.google.com/p/chromium/issues/detail?id=60900

I am having this same issue, and apparently it is worse when you have <img>
tags on the page that is supposed to be printed.

chro...@googlecode.com

unread,
Nov 2, 2010, 10:42:29 PM11/2/10
to chromi...@chromium.org

Comment #2 on issue 60900 by cody.lundquist: popups with <body
onLoad="window.print();window.close()"> doesn't print
http://code.google.com/p/chromium/issues/detail?id=60900

I can confirm that it also does not work if trying to use jQuery's document
ready function to make sure the page is loaded before trying to make it
print.

$(function() {
// Doesn't work in Chrome
window.print();
});

chro...@googlecode.com

unread,
Nov 9, 2010, 11:39:44 AM11/9/10
to chromi...@chromium.org

Comment #3 on issue 60900 by dan.defelippi: popups with <body
onLoad="window.print();window.close()"> doesn't print
http://code.google.com/p/chromium/issues/detail?id=60900

I've replicated the problem as well. It seems an automatic script in a
popup will not print, it requires interaction. If you put a button on a
popup that prints when clicked it will work, but if you simulate the click
using JS it will not print.

chro...@googlecode.com

unread,
Nov 23, 2010, 5:50:17 AM11/23/10
to chromi...@chromium.org

Comment #5 on issue 60900 by tbus...@gmail.com: popups with <body
onLoad="window.print();window.close()"> doesn't print
http://code.google.com/p/chromium/issues/detail?id=60900

We're coming across the same problem. What fixes this behavior is removing
the images we were loading. When the page is just text the print dialog
appears as in all other browsers.

chro...@googlecode.com

unread,
Nov 23, 2010, 6:10:32 AM11/23/10
to chromi...@chromium.org

Comment #6 on issue 60900 by tbus...@gmail.com: popups with <body
onLoad="window.print();window.close()"> doesn't print
http://code.google.com/p/chromium/issues/detail?id=60900

We just found a work around! Instead of calling "window.print();" in the
onload of the body we call "setTimeout('print()', 1);". Now Chrome shows
the print dialog as soon as the last image is loaded.

chro...@googlecode.com

unread,
Jun 14, 2011, 1:36:42 PM6/14/11
to chromi...@chromium.org

Comment #7 on issue 60900 by ksaravan...@gmail.com: popups with <body
onLoad="window.print();window.close()"> doesn't print
http://code.google.com/p/chromium/issues/detail?id=60900

Amazon.com uses window.print() function too (Amazon Returns -> Print
Label). I was not able to print some of those pages. This definitely is a
bug. I had to go back to Firefox for printing this page.

Reply all
Reply to author
Forward
0 new messages