From bcad586f2d5343d3cbca5bea5aa89c72ae5d275c Mon Sep 17 00:00:00 2001 From: Colin Chambers Date: Fri, 15 Jul 2011 10:36:31 +0100 Subject: [PATCH] MDL-47494 ddwtos: now prevents event on key down using ddwtos qtype #740 --- question/type/ddwtos/script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/question/type/ddwtos/script.js b/question/type/ddwtos/script.js index 979124fd35a..3e3e7cd2cbf 100755 --- a/question/type/ddwtos/script.js +++ b/question/type/ddwtos/script.js @@ -427,11 +427,13 @@ var ddwtos_currentzindex = 10; case 40: // arrow down (forwards) case 32: // space (forwards) changeObject(slotobj, 1); + YAHOO.util.Event.preventDefault(e); return false; //this has to return false because of IE case 37: // arrow left (backwards) case 38: // arrow up (backwards) changeObject(slotobj, -1); + YAHOO.util.Event.preventDefault(e); return false; //this has to return false because of IE case 66: // B (backwards) @@ -441,7 +443,7 @@ var ddwtos_currentzindex = 10; changeObject(slotobj, -1); break; - case 13: // cariage return (forwards) + case 13: // carriage return (forwards) case 70: // F (forwards) case 102: // f (forwards) case 78: // N (next)