[Bug 10376] New: Printing cart does not work under IE9
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10376 Bug ID: 10376 Summary: Printing cart does not work under IE9 Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Browser compatibility Assignee: oleonard@myacpl.org Reporter: m.de.rooy@rijksmuseum.nl This problem may be older than IE9; I do not know. Cannot check that for now. Since many patrons have IE9, it would be nice if they could print the contents of the cart on opac. Somehow this does not work now. See discussions like http://stackoverflow.com/questions/2555697/window-print-not-working-in-ie?rq... The proposed patch adds some code for IE. Works with setting a small timeout, calling window.print instead of print, and changing location on receiving focus back. Note that this last trick is also browser dependent. I do not favor browser dependent code, but at least we reach the goal of enabling the print function again for IE users.. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10376 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10376 --- Comment #1 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 18464 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18464&action=edit Bug 10376: Printing cart does not work under IE9 Test plan: 1) Test with Firefox (or any other browser except IE): Add biblio to cart Go to Cart and click Print Does the Cart window come back to its original state after confirm/cancel Print? 2) Test with Internet Explorer (I used IE9; testing another version is fine) Do the same as above. Is behavior now more or less the same? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10376 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Assignee|oleonard@myacpl.org |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10376 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18464|0 |1 is obsolete| | --- Comment #2 from Marc Véron <veron@veron.ch> --- Created attachment 18723 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18723&action=edit [SIGNED-OFF] Bug 10376: Printing cart does not work under IE9 Test plan: 1) Test with Firefox (or any other browser except IE): Add biblio to cart Go to Cart and click Print Does the Cart window come back to its original state after confirm/cancel Print? 2) Test with Internet Explorer (I used IE9; testing another version is fine) Do the same as above. Is behavior now more or less the same? Signed-off-by: Marc Veron <veron@veron.ch> 1) Test without patch: IE 10: Does not show print dialog IE 9 (Developer Emulation in IE 10): Does not show print dialog (as expected) FF 21.0 OK Chrome 27.0.1453.110 m: OK 2) Test with patch: IE 10: OK IE 9 (Developer Emulation in IE 10): OK IE 8 (Developer Emulation in IE 10): OK IE 7 (Developer Emulation in IE 10): OK FF 21.0 OK Chrome 27.0.1453.110 m: OK -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10376 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10376 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- Marcel, why do you use the obscure IEprint variable? A user will not be able to print twice the basket? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10376 --- Comment #4 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to comment #2)
Signed-off-by: Marc Veron <veron@veron.ch>
Great signoff, Marc, with all these browser versions. Thanks. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10376 --- Comment #5 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to comment #3)
Marcel, why do you use the obscure IEprint variable? A user will not be able to print twice the basket?
Hi Jonathan, He should normally not be able. But since I am working with a small timeout of 500 ms, I just want to be sure that it does not fire again. Thanks for asking, Marcel -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10376 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #6 from Chris Cormack <chris@bigballofwax.co.nz> --- I don't have IE so can't test this -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10376 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10376 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18723|0 |1 is obsolete| | --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 19625 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19625&action=edit [PASSED QA] Bug 10376: Printing cart does not work under IE9 Test plan: 1) Test with Firefox (or any other browser except IE): Add biblio to cart Go to Cart and click Print Does the Cart window come back to its original state after confirm/cancel Print? 2) Test with Internet Explorer (I used IE9; testing another version is fine) Do the same as above. Is behavior now more or less the same? Signed-off-by: Marc Veron <veron@veron.ch> 1) Test without patch: IE 10: Does not show print dialog IE 9 (Developer Emulation in IE 10): Does not show print dialog (as expected) FF 21.0 OK Chrome 27.0.1453.110 m: OK 2) Test with patch: IE 10: OK IE 9 (Developer Emulation in IE 10): OK IE 8 (Developer Emulation in IE 10): OK IE 7 (Developer Emulation in IE 10): OK FF 21.0 OK Chrome 27.0.1453.110 m: OK Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Trusting Marc here, as I don't have IE available. Regression tests in Firefox and Chromium went well. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10376 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #8 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Marcel! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10376 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |tomascohen@gmail.com --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch has been pushed to 3.12.x, will be in 3.12.7. Thanks Marcel! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10376 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #10 from David Cook <dcook@prosentient.com.au> --- Fun fact: Microsoft have changed the navigator.appName property to "Netscape" in IE11, so this latest fix won't work for newer versions of IE. http://msdn.microsoft.com/en-us/library/ie/bg182625(v=vs.85).aspx Conditional comments were also removed in IE 10 which makes "simpler" separation of browser dependent code impossible. http://msdn.microsoft.com/en-us/library/ie/hh801214(v=vs.85).aspx -- I've looked at this a million different ways...and there's always a problem. window.onfocus (works great for IE but doesn't work for Chrome or Firefox.) window.setTimeout (this has different syntax in different browsers. While you can get it to work with Chrome + IE or Chrome + FF, you can't seem to get it to work with all 3.) -- I was able to trigger location.href only after the "afterprint" event fired but it didn't make a difference. It still redirected before printing in IE. I tried using this as a guide: http://msdn.microsoft.com/en-us/library/ie/hh273397(v=vs.85).aspx But I can't think of any way to really identify IE as separate from FF or Chrome without more browser detection of some kind. The thing is that "window.onfocus" does work, but you have to remove focus from a FF or Chrome window by switching windows and coming back to it. -- I don't know if there really is a solution to this problem. It probably wouldn't help to open a new window, print, and close, because I think the same thing happens. -- I tried "<body onload="window.print()" onfocus='location.href="/cgi-bin/koha/opac-basket.pl?bib_list=[% bib_list %][% IF ( verbose ) %]&verbose=1[% END %]";'>", which works in IE and Firefox, but not Chrome... I don't know. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10376 --- Comment #11 from David Cook <dcook@prosentient.com.au> --- The thing to do is probably to open yet another window for the print. Would people be opposed to that idea? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org