[Bug 24061] New: Print List (opac-shelves.pl) broken in Chrome
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Bug ID: 24061 Summary: Print List (opac-shelves.pl) broken in Chrome Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org In Chrome if you try to print a public list from the OPAC the new tab is immediately closed by Chrome. TO TEST: -set up a new public list with a few items -go to the OPAC and view that list. -Click 'Print List' in Chrome. -The tab opens but immediately closes itself. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Which versions? Looks ok for me on Chrome 60.0.3112.113 and Chromium 73.0.3683.75 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Could this be related to the behavior fixed by bug 23680? I've tested too, but couldn't reproduce the problem: Google Chrome Version 70.0.3538.77 (Official Build) (64-bit) in Ubuntu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think the print code was changed at some point - which version are you looking at? I tested on master. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #4 from Lucas Gass <lucas@bywatersolutions.com> --- This is happening to me on master in Chrome 78.0.3904.97 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wizzyrea@gmail.com --- Comment #5 from Liz Rea <wizzyrea@gmail.com> --- Same results for me - go to print, window opens and immediately closes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- I think this is because the setTimeout() is too quick for Chrome. (1ms) 967 [% IF print %] 968 window.print(); 969 setTimeout('window.close()', 1); 970 [% END %] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #7 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 95589 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95589&action=edit Bug 24061: change setTimeout in opac-shelves.tt TEST PLAN: -set up a new public list with a few items -go to the OPAC and view that list. -Click 'Print List' in Chrome. -The tab opens but immediately closes itself. -Apply patch and try again -Now you can print! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 95591 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95591&action=edit [ALTERNATIVE-PATCH] Bug 24061: Close the window after the page has been printed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Hi Lucas, Stackoverflow suggests to close the window after it has been print, ie. it takes back the focus. The solution sounds quite good to me. Could you try it? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95589|0 |1 is obsolete| | --- Comment #10 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 95623 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95623&action=edit Bug 24061: Close the window after the page has been printed Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #11 from Lucas Gass <lucas@bywatersolutions.com> --- Jonathan, Yes this seems better to me and works perfect. Obsoleted my patch and SO'd on yours. Thanks so much. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |Failed QA --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- If you cancel the print action, the extra tab is not closed in Firefox. In that sense increasing the timeout worked better. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marcel de Rooy from comment #12)
If you cancel the print action, the extra tab is not closed in Firefox. In that sense increasing the timeout worked better.
It works for me, could you retry? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #13)
(In reply to Marcel de Rooy from comment #12)
If you cancel the print action, the extra tab is not closed in Firefox. In that sense increasing the timeout worked better.
It works for me, could you retry?
Retried although nothing changed. And still does not close the additional tab in FF when canceling the print dialog. If I confirm printing, it does close. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Which versions of Firefox are you using? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #16 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #15)
Which versions of Firefox are you using?
70.0.1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marcel de Rooy from comment #16)
(In reply to Jonathan Druart from comment #15)
Which versions of Firefox are you using?
70.0.1
I have exactly this version... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95591|0 |1 is obsolete| | Attachment #95623|0 |1 is obsolete| | --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 95664 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95664&action=edit Bug 24061: Close the window after the page has been printed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #17)
(In reply to Marcel de Rooy from comment #16)
(In reply to Jonathan Druart from comment #15)
Which versions of Firefox are you using?
70.0.1
I have exactly this version...
So, interestingly, or not, it did work on Firefox 70.0.1 but not on chromium. This patch makes the use of the onafterprint event which sounds definitely the correct way. This one works with chromium and Firefox. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #20 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Not with Chrome... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #21 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #20)
Not with Chrome...
https://www.w3schools.com/tags/ev_onafterprint.asp It says from Chrome 63, so I think it's the way to go. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #22 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Does not work fine with Chrome 62 too. Also a problem with Edge. Firefox seems to work. Easier to increase the timeout? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #23 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Waiting for 1 second before closing the window? Looks very ugly to me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #24 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 95715 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95715&action=edit Bug 24061: close after timeout if onafterprint no supported Not supported on Chrome < 63 https://www.w3schools.com/tags/ev_onafterprint.asp -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #25 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Let's do both then... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #26 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #25)
Let's do both then...
Seems to work in a quick test. Firefox, Chrome and Edge. Edge ask for permission to close the tab. Maybe change 1000 to 500 or even less? 100 works with me on Chrome -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Gabriel DeCarufel <gabriel.decarufel@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gabriel.decarufel@inlibro.c | |om Status|Needs Signoff |Signed Off --- Comment #27 from Gabriel DeCarufel <gabriel.decarufel@inlibro.com> --- printing a public list from the OPAC in chrome now works with this patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Guillaume Paquet <guillaume.paquet@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |guillaume.paquet@inLibro.co | |m --- Comment #28 from Guillaume Paquet <guillaume.paquet@inLibro.com> --- The patch was tested on Chrome 79 and worked properly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Gabriel DeCarufel <gabriel.decarufel@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95715|0 |1 is obsolete| | --- Comment #29 from Gabriel DeCarufel <gabriel.decarufel@inlibro.com> --- Created attachment 96971 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96971&action=edit Bug 24061: close after timeout if onafterprint no supported Not supported on Chrome < 63 https://www.w3schools.com/tags/ev_onafterprint.asp Signed-off-by: Gabriel DeCarufel <gabriel@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95664|0 |1 is obsolete| | Attachment #96971|0 |1 is obsolete| | --- Comment #30 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 97597 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97597&action=edit Bug 24061: Close the window after the page has been printed Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #31 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 97598 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97598&action=edit Bug 24061: Close after timeout if onafterprint no supported Not supported on Chrome < 63 https://www.w3schools.com/tags/ev_onafterprint.asp Signed-off-by: Gabriel DeCarufel <gabriel@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #32 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Reported in November... moving forward as this works ok for me in all tested browsers (Chrome, Chromium, Firefox). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 --- Comment #33 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com Version(s)|20.05.00 |20.05.00, 19.11.03 released in| | Status|Pushed to master |Pushed to stable --- Comment #34 from Joy Nelson <joy@bywatersolutions.com> --- Pushed to 19.11.x branch for 19.11.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.05.00, 19.11.03 |20.05.00, 19.11.03, released in| |19.05.08 Status|Pushed to stable |Pushed to oldstable --- Comment #35 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 19.05.x for 19.05.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Hayley Mapley <hayleymapley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.05.00, 19.11.03, |20.05.00, 19.11.03, released in|19.05.08 |19.05.08, 18.11.14 Status|Pushed to oldstable |Pushed to oldoldstable CC| |hayleymapley@catalyst.net.n | |z --- Comment #36 from Hayley Mapley <hayleymapley@catalyst.net.nz> --- Backported to 18.11.x for 18.11.14. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27282 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org