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:
tjhunt 2008-04-17 13:07:36 +00:00
parent 69aeb51364
commit 92589cb04b

View file

@ -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 {