MDL-8682 - the last commit caused a regression that stopped it working.

!something==somethingelse

is not the same as

something!==somethingelse

in javascript, it seems.
This commit is contained in:
tjhunt 2008-03-31 15:07:14 +00:00
parent 83947a36a8
commit 20b8b489ec

View File

@ -21,11 +21,12 @@ 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' && (!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
} else {
return true;
}
}
quiz_timer = {