Commit efe2bdfd authored by mradcliffe's avatar mradcliffe Committed by Joao Ventura

Issue #2324829 by mradcliffe, azovsky, hughworm: "Close window after sending...

Issue #2324829 by mradcliffe, azovsky, hughworm: "Close window after sending to printer" option breaks print on Chrome
parent c85b0736
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment