Commit e347d4778e8586a6f9c1280df854004fef608b45

Authored by Miguel Barão
1 parent 7e354edb
Exists in master and in 1 other branch dev

- fixed enter key in textarea

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