From: tjhunt Date: Thu, 17 Apr 2008 13:07:36 +0000 (+0000) Subject: MDL-8682 - yet another followup. The javascript still was not quite right. you cannot... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=92589cb04becccf1e1c9752b3b4a9ab6d6043796;p=moodle.git MDL-8682 - yet another followup. The javascript still was not quite right. you cannot rely on the case of element.nodeName. --- diff --git a/mod/quiz/quiz.js b/mod/quiz/quiz.js index c8c088c4b8..2ced50fc1c 100644 --- a/mod/quiz/quiz.js +++ b/mod/quiz/quiz.js @@ -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 {