summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormradcliffe2018-09-26 17:23:46 (GMT)
committerJoao Ventura2018-09-26 17:23:46 (GMT)
commitefe2bdfd332431c546291b4e367ffb1c8f279158 (patch)
tree9a5bc05f94fb583a25311c73c4fa845cd450623b
parentc85b07364e8baf8dee12be627c71002d2fcee9f7 (diff)
Issue #2324829 by mradcliffe, azovsky, hughworm: "Close window after sending to printer" option breaks print on Chrome7.x-1.x
-rw-r--r--print.pages.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/print.pages.inc b/print.pages.inc
index c53ebaf..dfc539a 100644
--- a/print.pages.inc
+++ b/print.pages.inc
@@ -224,7 +224,7 @@ function _print_var_generator($node, $query = NULL, $message = NULL, $cid = NULL
$print['css'] = drupal_get_css($drupal_css);
}
- $window_close = ($print_html_new_window && $print_html_windowclose) ? 'window.close();' : '';
+ $window_close = ($print_html_new_window && $print_html_windowclose) ? 'setTimeout(function(){window.close();},1);' : '';
$print['sendtoprinter'] = $print_html_sendtoprinter ? '<script type="text/javascript">(function ($) { Drupal.behaviors.print = {attach: function(context) {$(window).load(function() {window.print();' . $window_close . '})}}})(jQuery);</script>' : '';
switch ($print_logo_options) {