mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +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) {
|
function check_enter(e) {
|
||||||
var target = e.target ? e.target : e.srcElement;
|
var target = e.target ? e.target : e.srcElement;
|
||||||
var keyCode = e.keyCode ? e.keyCode : e.which;
|
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'))) {
|
(!target.type || !(target.type=='submit' || target.type=='textarea'))) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue