Bug 13089 - Tab key triggers JavaScript error in the checkEnter function
Summary: Tab key triggers JavaScript error in the checkEnter function
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-15 16:27 UTC by Owen Leonard
Modified: 2015-06-04 23:32 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 13089 - Tab key triggers JavaScript error in the checkEnter function (1.91 KB, patch)
2014-10-15 16:47 UTC, Owen Leonard
Details | Diff | Splinter Review
[Signed-off] Bug 13089 - Tab key triggers JavaScript error in the checkEnter function (2.15 KB, patch)
2014-10-29 21:46 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 13089 - Tab key triggers JavaScript error in the checkEnter function (2.29 KB, patch)
2014-10-30 00:05 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2014-10-15 16:27:50 UTC
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
Comment 1 Owen Leonard 2014-10-15 16:47:42 UTC Comment hidden (obsolete)
Comment 2 Frédéric Demians 2014-10-25 12:08:34 UTC
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).
Comment 3 Owen Leonard 2014-10-25 15:24:40 UTC
(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.
Comment 4 Marc Véron 2014-10-29 21:46:38 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2014-10-30 00:05:31 UTC
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.
Comment 6 Tomás Cohen Arazi (tcohen) 2014-11-07 18:23:05 UTC
Patch pushed to master.

Thanks Owen!