From 2e3a89a2b68f3fd6f20e30f3d9c7677d977d2cbd 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: Katrin Fischer --- 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 d7428efc73..8dc11c47aa 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt @@ -981,7 +981,9 @@ $(function() { [% IF print %] window.print(); - setTimeout('window.close()', 1); + window.onafterprint = function () { + window.close(); + } [% END %] AdjustRemark(); -- 2.11.0