]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-8682 - followup. When disabling the enter key, don't disable it on links. That...
authortjhunt <tjhunt>
Tue, 11 Dec 2007 16:23:54 +0000 (16:23 +0000)
committertjhunt <tjhunt>
Tue, 11 Dec 2007 16:23:54 +0000 (16:23 +0000)
mod/quiz/quiz.js

index f7e24e6188090f5f777bd555cffadeb2793ddc62..a39c1e935fcecafaf396ded91c9be4d8a0e6365a 100644 (file)
@@ -22,7 +22,7 @@ function check_enter(e) {
     var target = e.target ? e.target : e.srcElement;
     var keyCode = e.keyCode ? e.keyCode : e.which;
 
-    if(keyCode==13 && (!target.type || (target.type!='submit' && target.type!='textarea')))
+    if(keyCode==13 && !target.nodeName=='a' && (!target.type || (target.type!='submit' && target.type!='textarea')))
         return false;
     else
         return true;