[Bug 10310] New: Prevent submit form pressing enter should be improved
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 Bug ID: 10310 Summary: Prevent submit form pressing enter should be improved Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Staff Client Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@biblibre.com CC: gmcharlt@gmail.com Actually it does not work for IE (see Marcel's comment on bug 9507). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |jonathan.druart@biblibre.co |ity.org |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 18314 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18314&action=edit Bug 10310: Prevent submitting form with enter does not work with IE I am not able to test this patch with IE... I tested it with Chromium and FF and it works great. This patch can be tested on the neworderempty.pl page -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Depends on| |9507 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18314|0 |1 is obsolete| | --- Comment #2 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 18316 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18316&action=edit Bug 10310: Prevent submitting form with enter does not work with IE I am not able to test this patch with IE... I tested it with Chromium and FF and it works great. This patch can be tested on the neworderempty.pl page Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tested with FF and IE. Works for both. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact| |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=10310 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #3 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- QA Comment: Very quick! fix from Jonathan as followup for 9507. Tested neworderempty on FF and IE. Grepped prevent_submit and checked templates for doc3 tag. Notes textarea still worked with Enter. Good improvement and reduction of code. Seems to be browser independent. Two document ready functions are not a problem for jQuery too. Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- This seems to work in IE9, but I think it has an unintended consequence: You can't tab to the submit button and hit <enter> to submit. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #5 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to comment #4)
This seems to work in IE9, but I think it has an unintended consequence: You can't tab to the submit button and hit <enter> to submit.
So true. This just went too fast :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18316|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 18317 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18317&action=edit Bug 10310: Prevent submitting form with enter does not work with IE I am not able to test this patch with IE... I tested it with Chromium and FF and it works great. This patch can be tested on the neworderempty.pl page -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #4)
This seems to work in IE9, but I think it has an unintended consequence: You can't tab to the submit button and hit <enter> to submit.
Yep good catch Owen! The last patch returns false only if enter is pressed on input with a type != "submit". I don't find a case where a problem can occur. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18317|0 |1 is obsolete| | --- Comment #8 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 18324 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18324&action=edit Bug 10310: Prevent submitting form with enter does not work with IE I am not able to test this patch with IE... I tested it with Chromium and FF and it works great. This patch can be tested on the neworderempty.pl page Signed-off-by: Marcel de Rooy <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=10310 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 --- Comment #9 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Tested it again. Entering the submit button works now. Signed off. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #10 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- My former QA comment still holds. Good improvement. Just curious about this line: $(e.target).attr('type') != "submit" Is there a difference with using e.target.type? Does jQuery not guarantee already that object e contains a 'which' and 'target'? Note that you assume that in the lines before this line when you directly refer to e.which and e.target. This tiny inconsistency does not prevent me from passing QA on this patch (second try). Just wait for Owen :) This patch makes it work too on IE9 which did not work. I could not test on earlier versions of IE. Not encouraging IE for staff at all btw.. Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 --- Comment #11 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #10)
Just curious about this line: $(e.target).attr('type') != "submit" Is there a difference with using e.target.type? Does jQuery not guarantee already that object e contains a 'which' and 'target'?
Yes, you are right, it is inconsistent. I will provide a followup. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 --- Comment #12 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 18326 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18326&action=edit Bug 10310: Followup Prevent submitting form with enter does not work with IE Check e.target.type instead of using jQuery. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Needs Signoff --- Comment #13 from Jonathan Druart <jonathan.druart@biblibre.com> --- Switch back to Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18324|0 |1 is obsolete| | Attachment #18326|0 |1 is obsolete| | --- Comment #14 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 18329 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18329&action=edit Bug 10310: Prevent submitting form with enter does not work with IE I am not able to test this patch with IE... I tested it with Chromium and FF and it works great. This patch can be tested on the neworderempty.pl page Signed-off-by: Marcel de Rooy <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=10310 --- Comment #15 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 18330 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18330&action=edit Bug 10310: Followup Prevent submitting form with enter does not work with IE Check e.target.type instead of using jQuery. Signed-off-by: Marcel de Rooy <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=10310 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #16 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Nothing to say :) Back to Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #17 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |tomascohen@gmail.com --- Comment #18 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Nice fix, thanks Jonathan! This patch has been pushed to 3.12.x, will be in 3.12.1. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com --- Comment #19 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Pushed to 3.10.x, will be in 3.10.7 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10310 Chris Hall <chrish@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chrish@catalyst.net.nz --- Comment #20 from Chris Hall <chrish@catalyst.net.nz> --- Apply perfectly since the 9507 fixup. Pushed both patches to 3.8.x, will be in 3.8.14. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org