From bc4facdfe51a6e4f397b80ff3efc23dfc830eb91 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 Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson (cherry picked from commit 1bcff5d39f441c57ffc12fa596976e1a3d099ba1) Signed-off-by: Lucas Gass (cherry picked from commit a7b296fd2615724d8747c1aff5e0369fe66c0f50) Signed-off-by: Hayley Mapley --- 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 9d1fd3fa4a..4a1ce01dac 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt @@ -957,7 +957,9 @@ $(function() { [% IF print %] window.print(); - setTimeout('window.close()', 1); + window.onafterprint = function () { + window.close(); + } [% END %] AdjustRemark(); -- 2.39.5