Bugzilla – Attachment 189971 Details for
Bug 38072
Regression with modalPrint
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38072: Ensure the printing tab closes
Bug-38072-Ensure-the-printing-tab-closes.patch (text/plain), 1.21 KB, created by
Nick Clemens (kidclamp)
on 2025-11-26 16:48:07 UTC
(
hide
)
Description:
Bug 38072: Ensure the printing tab closes
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-11-26 16:48:07 UTC
Size:
1.21 KB
patch
obsolete
>From f03d60213981bcc116d8eb456fcb7e311b6570a8 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Mon, 7 Oct 2024 15:50:39 +0000 >Subject: [PATCH] Bug 38072: Ensure the printing tab closes > >--- > koha-tmpl/intranet-tmpl/prog/js/modal_printer.js | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/modal_printer.js b/koha-tmpl/intranet-tmpl/prog/js/modal_printer.js >index ac562c70569..ea1608111a6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/modal_printer.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/modal_printer.js >@@ -41,12 +41,13 @@ $(document).ready(function () { > win.document.write(title); > win.document.write(contents); > win.document.close(); >- win.focus(); >- win.print(); >- win.onafterprint = function () { >+ win.addEventListener( 'afterprint', function () { >+ win.addEventListener( 'focus', function () { >+ win.close(); >+ }); > win.close(); >- } >- setTimeout('window.close()', 1000); //Hack from Chrome < 63 >+ }); >+ win.print(); > } > > // Set focused on printable modals on open and autoprint if required >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38072
:
172360
|
172483
|
172508
|
172509
|
189970
|
189971
|
189979
|
189980
|
190008