From 51bc2efa01f76cf4a09f617c01745956e49b217e Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Thu, 2 Feb 2017 11:10:30 +0100
Subject: [PATCH] Bug 14224: Fix prevent submit

That did not work, the form was submitted anyway

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
---
 koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
index 63950cb..c777386 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
@@ -901,11 +901,13 @@ Using this account is not recommended because some parts of Koha will not functi
                 $("a[name='nonjs_submitnote']").hide();
 
                 $("input[name='note']").prop('readonly', false);
-                $("input[name='note']").keyup(function(e){
+                $("input[name='note']").keypress(function(e){
                     /* prevent submitting of renewselected form */
                     if(e.which == 13)
                         e.preventDefault();
+                });
 
+                $("input[name='note']").keyup(function(e){
                     var $btn_save = $('#save_'+$(this).data('issue_id'));
                     var origvalue = $(this).data('origvalue');
                     var value = $(this).val();
-- 
2.1.4