[Bug 25349] New: Enter in the username field submits the login, instead of moving focus to the password field
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 Bug ID: 25349 Summary: Enter in the username field submits the login, instead of moving focus to the password field Change sponsored?: --- Product: Koha Version: 19.05 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Self checkout Assignee: koha-bugs@lists.koha-community.org Reporter: bwsdonna@gmail.com QA Contact: testopia@bugs.koha-community.org When using self checkout set to login with username and password and an "enter" function is submitted in the username field, the form is submitted instead of moving the focus to the password field. For libraries that have patrons scan their barcode for the username, this causes a never ending loop of not being able to login. The "enter" function is necessary from the barcode scanner when checking out books etc, so that can't be changed. The desired behavior would be to move the focus to next field on the form so patrons can scan their barcode, then type in the password, and then the enter key would submit the form. To recreate: 1. Enable self checkout function 2. Set sys pref SelfCheckoutByLogin to Username and Password 3. Go to your self check site and log in as your self check user 4. In the username field, type in a username and hit the enter key, or using a barcode scanner, scan a barcode. 5. Notice that the form is submitted, and results in a failed login, returning the patron to a blank log in screen. The same behavior is in 18.11, 19.05, and 19.11. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #1 from Lucas Gass <lucas@bywatersolutions.com> --- I think submitting a form by pressing Enter is a default behavior for form submission and I will be interested to hear what others say about this. In the meantime this javascript in the SCOUserJS system preference can alleviate the problem: (at least for US keyboards) document.getElementById("patronlogin").onkeypress = function(e) { var key = e.charCode || e.keyCode || 0; if (key == 13) { document.getElementById("patronpw").focus(); return false; } } -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- The staff client has a globally-available checkEnter function which we use in multiple places. The same could easily be added to the OPAC. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 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. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 --- Comment #3 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 104378 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104378&action=edit Bug 25349: Add checkEnter function and apply it to SCO page This patch adds the checkEnter function to the OPAC global.js and then applies it to the SCO login page. TO TEST: 1. Go to SCO login and try entering something in the "Login:" input amd "Password:" input. 2. Pressing enter while in either will automatically submit the form. 3. Apply patch. 4. Repeat step 1-2. 5. This time the form should not submit itself when you press Enter. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|19.05 |master -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104378|0 |1 is obsolete| | --- Comment #4 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 105446 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105446&action=edit Bug 25349: Add checkEnter function and apply it to SCO page This patch adds the checkEnter function to the OPAC global.js and then applies it to the SCO login page. TO TEST: 1. Go to SCO login and try entering something in the "Login:" input amd "Password:" input. 2. Pressing enter while in either will automatically submit the form. 3. Apply patch. 4. Repeat step 1-2. 5. This time the form should not submit itself when you press Enter. Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #5 from Victor Grousset/tuxayo <victor@tuxayo.net> --- It works! :D However, is there a reason for the password field to not submit the form when hitting enter? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 Victor Grousset/tuxayo <victor@tuxayo.net> 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=25349 --- Comment #6 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Wait, title says that hitting enter in the login field should move focus to the password field. But the patch only mentions not sending the form. So what are the current specs? For the above point and the above comment. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 --- Comment #7 from Lucas Gass <lucas@bywatersolutions.com> --- Good point Victor, Currently it will not submit the form by pressing enter in either of the fields. But maybe it would be better workflow if it DID submit the form when pressing enter in the 2nd field (password)? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 --- Comment #8 from Donna <bwsdonna@gmail.com> --- (In reply to Lucas Gass from comment #7)
Good point Victor,
Currently it will not submit the form by pressing enter in either of the fields. But maybe it would be better workflow if it DID submit the form when pressing enter in the 2nd field (password)?
This would be the ideal behavior. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- Failing qa here and will submit a new patch ASAP -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 Lucas Gass <lucas@bywatersolutions.com> 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=25349 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105446|0 |1 is obsolete| | --- Comment #10 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 105533 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105533&action=edit Bug 25349: Add checkEnter function and apply it to SCO page This patch adds the checkEnter function to the OPAC global.js and then applies it to the SCO login page. TO TEST: 1. Go to SCO login and try entering something in the "Login:" input amd "Password:" input. 2. Pressing enter while in either will automatically submit the form. 3. Apply patch. 4. Type something into the Login: field and press enter, the form should NOT submit. 5. Type something into the Password: field and pess enter, this SHOULD submit the form. 6. Change the syspref SelfCheckoutByLogin to 'Cardnumber' 7. TType something into the Please enter your card number: field, the form should NOT submit. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 --- Comment #11 from Lucas Gass <lucas@bywatersolutions.com> --- I changed how this patch functions so I am reseting to Needs Sign-off, I also removed Victor's sign-off line. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105533|0 |1 is obsolete| | --- Comment #12 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 105556 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105556&action=edit Bug 25349: Add checkEnter function and apply it to SCO page This patch adds the checkEnter function to the OPAC global.js and then applies it to the SCO login page. TO TEST: 1. Go to SCO login and try entering something in the "Login:" input amd "Password:" input. 2. Pressing enter while in either will automatically submit the form. 3. Apply patch. 4. Type something into the Login: field and press enter, the form should NOT submit. 5. Type something into the Password: field and pess enter, this SHOULD submit the form. 6. Change the syspref SelfCheckoutByLogin to 'Cardnumber' 7. Type something into the Please enter your card number: field, the form should submit. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105556|0 |1 is obsolete| | --- Comment #13 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 105557 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105557&action=edit Bug 25349: Add checkEnter function and apply it to SCO page This patch adds the checkEnter function to the OPAC global.js and then applies it to the SCO login page. TO TEST: 1. Go to SCO login and try entering something in the "Login:" input amd "Password:" input. 2. Pressing enter while in either will automatically submit the form. 3. Apply patch. 4. Type something into the Login: field and press enter, the form should NOT submit. 5. Type something into the Password: field and pess enter, this SHOULD submit the form. 6. Change the syspref SelfCheckoutByLogin to 'Cardnumber' 7. Type something into the Please enter your card number: field, the form should submit. Signed-off-by: Donnab <donna@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 Donna <bwsdonna@gmail.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=25349 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105557|0 |1 is obsolete| | --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 105858 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105858&action=edit Bug 25349: Add checkEnter function and apply it to SCO page This patch adds the checkEnter function to the OPAC global.js and then applies it to the SCO login page. TO TEST: 1. Go to SCO login and try entering something in the "Login:" input amd "Password:" input. 2. Pressing enter while in either will automatically submit the form. 3. Apply patch. 4. Type something into the Login: field and press enter, the form should NOT submit. 5. Type something into the Password: field and pess enter, this SHOULD submit the form. 6. Change the syspref SelfCheckoutByLogin to 'Cardnumber' 7. Type something into the Please enter your card number: field, the form should submit. Signed-off-by: Donnab <donna@bywatersolutions.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=25349 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.11.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=25349 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.11.00 |20.11.00, 20.05.01 released in| | Status|Pushed to master |Pushed to stable --- Comment #16 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 20.05.x for 20.05.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz --- Comment #17 from Aleisha Amohia <aleisha@catalyst.net.nz> --- this doesn't appear to fix the bug on 19.11.x, the form still submits when pressing enter in the username box. not backported -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 Chris Slone <cslone@camdencountylibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cslone@camdencountylibrary. | |org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25349 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to stable |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org