From 4a5f150b078f9b8a321004e32b1f67028b691eb1 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 15 Oct 2014 12:36:27 -0400 Subject: [PATCH] Bug 13089 - Tab key triggers JavaScript error in the checkEnter function Content-Type: text/plain; charset="utf-8" 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. --- koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js index fa75b44..5b086f1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js @@ -55,10 +55,8 @@ $.fn.selectTabByID = function (tabID) { function checkEnter(e){ //e is event object passed from function invocation var characterCode; // literal character code will be stored in this variable if(e && e.which){ //if which property of event object is supported (NN4) - e = e; characterCode = e.which; //character code is contained in NN4's which property } else { - e = window.event; characterCode = e.keyCode; //character code is contained in IE's keyCode property } -- 1.7.9.5