Comment #3 on issue 178931 by
ch...@sillevis.net: Print dialog stops all
javascript
http://code.google.com/p/chromium/issues/detail?id=178931
> Are you printing using the system print dialog, or the print preview in
> Chrome?
Sorry, allow me to clarify:
* Printing using the system print dialog (--disable-print-preview) creates
the issues where the print dialog hides behind the (--kiosk) screen
preventing access to the page (whether JS is blocked or not).
* Behaviour when not adding --disable-print-preview is such that the
receipt being printed ends up twice as big (this is a seperate bug, which I
won't try and pursue here).
> Also, could you verify which channel you're on? M26 should not be stable
> yet.
Sorry about M26, it's the latest Windows stable (25 something).
> Lastly, if you have any example page (w/HTML/JS) that is affected by this
> issue, please attach it to the bug.
I will have to recreate a page which replicates the bug, as it is behind a
login. Give me some time and I will get to it.
> Are you actually pressing ctrl+p or using window.print()? I wrote a
> simple page that does window.setInterval(window.alert('hi')),timeout);
> and it continues to fire even with the print preview dialog open.
It's a window.print(); This is the exact code (var printCSS has the HTML):
// Create printer popup
var w =
window.open( '', '', 'width=260,height=600,scrollbars=no,menubar=no,toolbar=no,location=no,status=no,titlebar=no'
)
w.document.write( '<html><head><style type="text/css">' + printCSS
+ '</style><title> </title></head><body style="margin: 0px; padding:
0px;">' + rcpt.html() + '<script>setTimeout(function(){ window.print();
window.parent.focus(); window.close() }, 100)</script></body></html>' )
> Can you explain more about what you are trying to do? Are you using
> --kiosk ? --kiosk-printing? I don't understand what you mean by "the
> dialog hides behind the screen". With print preview, the print dialog
> cannot go underneath the tab it's in.
--kiosk and --disable-print-preview, for some clients we have enabled
--kiosk-printing because of this bug, but it produces twice as long
receipts (because --disable-print-preview is ignored when --kiosk-printing
is enabled - it will use Chrome's dialog to auto-click).