Some input fields in Koha (the patron editor, for instance), have a class applied to them so that they will be "filtered" by the checkEnter function which prevents the enter key from submitting the form. Tabbing between such input fields triggers a JavaScript error with each tab: TypeError: e is undefined /intranet-tmpl/prog/en/js/staff-global.js Line 62
Created attachment 32375 [details] [review] Bug 13089 - Tab key triggers JavaScript error in the checkEnter function Tabbing through fields in the patron add form or MARC editor triggers a JavaScript error for each tab. The cause seems to be some JS which was designed to accommodate differences between Mozilla browsers and Internet Explorer. A slight modification seems to work just as well in Firefox and IE. To test, apply the patch and clear your browser cache if necessary. To look for JavaScript errors, open the Developer Tools console in Firefox, Chrome, or Internet Explorer (or in Firefox's Firebug console). Create a new patron and use the tab key to move between inputs. No error should be reported in the console. Test typing in fields and pressing enter. The form should not be submitted. Test in all available browsers, including at least IE11, IE10, and IE9.
I can see the bug in FF, and confirm that your patch fix it. But I can't see it neither if IE nor in Chrome (Ubuntu & Windows).
(In reply to Frédéric Demians from comment #2) > But I can't see > it neither if IE nor in Chrome (Ubuntu & Windows). If there is no error in any of those browsers after applying the patch and following the test plan then it sound like it's working correctly.
Created attachment 32945 [details] [review] [Signed-off] Bug 13089 - Tab key triggers JavaScript error in the checkEnter function Tabbing through fields in the patron add form or MARC editor triggers a JavaScript error for each tab. The cause seems to be some JS which was designed to accommodate differences between Mozilla browsers and Internet Explorer. A slight modification seems to work just as well in Firefox and IE. To test, apply the patch and clear your browser cache if necessary. To look for JavaScript errors, open the Developer Tools console in Firefox, Chrome, or Internet Explorer (or in Firefox's Firebug console). Create a new patron and use the tab key to move between inputs. No error should be reported in the console. Test typing in fields and pressing enter. The form should not be submitted. Test in all available browsers, including at least IE11, IE10, and IE9. Reproduced with FF 32 Tested with FF 32, Chrome 38, IE 11 and IE Emulations 8,9,10 No JavaScript errors found. Enter does not submit. Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 32955 [details] [review] [PASSED QA] Bug 13089 - Tab key triggers JavaScript error in the checkEnter function Tabbing through fields in the patron add form or MARC editor triggers a JavaScript error for each tab. The cause seems to be some JS which was designed to accommodate differences between Mozilla browsers and Internet Explorer. A slight modification seems to work just as well in Firefox and IE. To test, apply the patch and clear your browser cache if necessary. To look for JavaScript errors, open the Developer Tools console in Firefox, Chrome, or Internet Explorer (or in Firefox's Firebug console). Create a new patron and use the tab key to move between inputs. No error should be reported in the console. Test typing in fields and pressing enter. The form should not be submitted. Test in all available browsers, including at least IE11, IE10, and IE9. Reproduced with FF 32 Tested with FF 32, Chrome 38, IE 11 and IE Emulations 8,9,10 No JavaScript errors found. Enter does not submit. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Tested in Chromium, confirmed the problem and that the patch fixes it. Passes tests and QA script.
Patch pushed to master. Thanks Owen!