diff --git a/aprendizations/static/js/topic.js b/aprendizations/static/js/topic.js index 7acd2e3..532af82 100644 --- a/aprendizations/static/js/topic.js +++ b/aprendizations/static/js/topic.js @@ -67,13 +67,13 @@ function new_question(type, question, tries, progress) { }); } - // prevent enter submit. - //input:text, input:radio, input:checkbox - $("body").keyup(function (e) { - if (e.keyCode == 13 && e.shiftKey) { - $("#submit").click(); + // disable enter in some question types (prevent submission on enter) + $("input:text, input:radio, input:checkbox").keydown(function (e) { + if (e.keyCode == 13 || e.keyCode == 169) { + e.preventDefault(); return false; - }}); + } + }); } -- libgit2 0.21.2