mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
MDL-8682 - yet another followup. The javascript still was not quite right. you cannot rely on the case of element.nodeName.
This commit is contained in:
parent
69aeb51364
commit
92589cb04b
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ are actually on the submit button. Don't stop the user typing things in text are
|
|||
function check_enter(e) {
|
||||
var target = e.target ? e.target : e.srcElement;
|
||||
var keyCode = e.keyCode ? e.keyCode : e.which;
|
||||
if (keyCode==13 && target.nodeName!='a' &&
|
||||
if (keyCode==13 && target.nodeName.toLowerCase()!='a' &&
|
||||
(!target.type || !(target.type=='submit' || target.type=='textarea'))) {
|
||||
return false;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue