Bugzilla – Attachment 172509 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.31 KB, created by
Victor Grousset/tuxayo
on 2024-10-08 06:08:40 UTC
(
hide
)
Description:
Bug 38072: Ensure the printing tab closes
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2024-10-08 06:08:40 UTC
Size:
1.31 KB
patch
obsolete
>From 64eb7cca038e789eb6a59bd4d79df2c60e1dd72d 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 | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/modal_printer.js b/koha-tmpl/intranet-tmpl/prog/js/modal_printer.js >index b93b82e62c..b199a6699a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/modal_printer.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/modal_printer.js >@@ -38,16 +38,17 @@ $(document).ready(function() { > text-align: left; > } > </style> >- `) >+ `); > 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.47.0
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