Bug 10310: Followup Prevent submitting form with enter does not work with IE
authorJonathan Druart <jonathan.druart@biblibre.com>
Thu, 23 May 2013 07:33:48 +0000 (09:33 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 23 May 2013 14:32:50 +0000 (07:32 -0700)
Check e.target.type instead of using jQuery.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/js/prevent_submit.js

index 2e6d385..8ca0def 100644 (file)
@@ -3,7 +3,7 @@ $(document).ready(function() {
   $("#doc3 form").keypress(function (e) {
     if( e.which == 13
         && e.target.nodeName == "INPUT"
-        && $(e.target).attr('type') != "submit"
+        && e.target.type != "submit"
     ) {
         return false;
     }