From 0a4dd3495c47401da54f098407c6c402f1441d8c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 20 Nov 2019 09:19:51 +0100 Subject: [PATCH] Bug 24061: Close the window after the page has been printed Signed-off-by: Lucas Gass --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt index c1d273f66e..5ed3c4c37c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt @@ -966,7 +966,9 @@ $(function() { [% IF print %] window.print(); - setTimeout('window.close()', 1); + window.onfocus = function () { + window.close(); + } [% END %] AdjustRemark(); -- 2.11.0