Bugzilla – Attachment 190008 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: Fix regression in modal_printer
Bug-38072-Fix-regression-in-modalprinter.patch (text/plain), 2.07 KB, created by
Marcel de Rooy
on 2025-11-28 07:53:54 UTC
(
hide
)
Description:
Bug 38072: Fix regression in modal_printer
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-11-28 07:53:54 UTC
Size:
2.07 KB
patch
obsolete
>From f7aadd8c4e0b06d98f624730ba996f264458cb8e Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 3 Oct 2024 15:41:05 +0100 >Subject: [PATCH] Bug 38072: Fix regression in modal_printer >Content-Type: text/plain; charset=utf-8 > >This patch updates the JS for the modal printer to make it more >reliable. > >I found that in recent versions of chrome the print dialog failed to >open and instead you were just faced with a flash of white before the >new tab autoclosed and no print takes place. > >Test plan >1) Enable cash registers and point of sale preferences >2) Add a debit type and mark it as 'Can be sold' >3) Add a cash register >4) Use 'Point of sale' to sell one of the above item for cash against > the register you just created. >5) Navigate to the register and 'cashup' >6) Click the 'summary' link to display a modal >7) Use the 'Print' option in the modal and confirm you face a print > dialog and can print >8) The print tab should be closed and you should be back to Koha > >Signed-off-by: David Nind <david@davidnind.com> > >Bug 38072: Ensure the printing tab closes > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >[EDIT] Squashed and tidied. >--- > koha-tmpl/intranet-tmpl/prog/js/modal_printer.js | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/modal_printer.js b/koha-tmpl/intranet-tmpl/prog/js/modal_printer.js >index ddc3b6d745..42289b8d3f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/modal_printer.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/modal_printer.js >@@ -40,8 +40,14 @@ $(document).ready(function () { > `); > win.document.write(title); > win.document.write(contents); >+ win.document.close(); >+ win.addEventListener("afterprint", function () { >+ win.addEventListener("focus", function () { >+ win.close(); >+ }); >+ win.close(); >+ }); > win.print(); >- win.close(); > } > > // 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