Commit e347d4778e8586a6f9c1280df854004fef608b45
1 parent
7e354edb
Exists in
master
and in
1 other branch
- fixed enter key in textarea
Showing
2 changed files
with
9 additions
and
4 deletions
Show diff stats
BUGS.md
1 | 1 | ||
2 | BUGS: | 2 | BUGS: |
3 | 3 | ||
4 | +- textarea, text devem mostrar no html os valores iniciais de ans, se existir | ||
4 | - detect questions in questions.yaml without ref -> error ou generate default. | 5 | - detect questions in questions.yaml without ref -> error ou generate default. |
5 | - error if demo.yaml has no topics | 6 | - error if demo.yaml has no topics |
6 | - pymips a funcionar | 7 | - pymips a funcionar |
templates/learn.html
@@ -164,12 +164,16 @@ function updateQuestion(response){ | @@ -164,12 +164,16 @@ function updateQuestion(response){ | ||
164 | MathJax.Hub.Queue(["Typeset",MathJax.Hub,"question_div"]); | 164 | MathJax.Hub.Queue(["Typeset",MathJax.Hub,"question_div"]); |
165 | 165 | ||
166 | $("textarea, input:text, input:radio, input:checkbox").keydown(function (e) { | 166 | $("textarea, input:text, input:radio, input:checkbox").keydown(function (e) { |
167 | - if (e.keyCode == 13) { | 167 | + if (e.keyCode == 13 && e.shiftKey) { |
168 | e.preventDefault(); | 168 | e.preventDefault(); |
169 | - if (e.shiftKey) { | ||
170 | - getQuestion(); | ||
171 | - } | 169 | + getQuestion(); |
172 | } | 170 | } |
171 | + // if (e.keyCode == 13) { | ||
172 | + // e.preventDefault(); | ||
173 | + // if (e.shiftKey) { | ||
174 | + // getQuestion(); | ||
175 | + // } | ||
176 | + // } | ||
173 | }); | 177 | }); |
174 | // var audio = new Audio('/static/sounds/correct.mp3'); | 178 | // var audio = new Audio('/static/sounds/correct.mp3'); |
175 | // audio.play(); | 179 | // audio.play(); |