From e347d4778e8586a6f9c1280df854004fef608b45 Mon Sep 17 00:00:00 2001 From: Miguel BarĂ£o Date: Fri, 31 Mar 2017 20:00:16 +0100 Subject: [PATCH] - fixed enter key in textarea --- BUGS.md | 1 + templates/learn.html | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/BUGS.md b/BUGS.md index c5d1437..92be560 100644 --- a/BUGS.md +++ b/BUGS.md @@ -1,6 +1,7 @@ BUGS: +- textarea, text devem mostrar no html os valores iniciais de ans, se existir - detect questions in questions.yaml without ref -> error ou generate default. - error if demo.yaml has no topics - pymips a funcionar diff --git a/templates/learn.html b/templates/learn.html index 79993fc..defa8a6 100644 --- a/templates/learn.html +++ b/templates/learn.html @@ -164,12 +164,16 @@ function updateQuestion(response){ MathJax.Hub.Queue(["Typeset",MathJax.Hub,"question_div"]); $("textarea, input:text, input:radio, input:checkbox").keydown(function (e) { - if (e.keyCode == 13) { + if (e.keyCode == 13 && e.shiftKey) { e.preventDefault(); - if (e.shiftKey) { - getQuestion(); - } + getQuestion(); } + // if (e.keyCode == 13) { + // e.preventDefault(); + // if (e.shiftKey) { + // getQuestion(); + // } + // } }); // var audio = new Audio('/static/sounds/correct.mp3'); // audio.play(); -- libgit2 0.21.2