# HG changeset patch # User Brecht De Man # Date 1448294687 0 # Node ID 2ad8022d17a778438bfcfd67e488941f10f90032 # Parent b448ed356355173e62b20b3838bcba32617b6bfc Revert revision 349 regarding change to enter behaviour: enter in a dialog box goes to next question/message, starts test or submits answers, rather than to create a new line / carriage return. diff -r b448ed356355 -r 2ad8022d17a7 core.js --- a/core.js Mon Nov 23 16:02:37 2015 +0000 +++ b/core.js Mon Nov 23 16:04:47 2015 +0000 @@ -190,6 +190,12 @@ textArea.rows = "10"; break; } + document.onkeydown=function(){ + if(window.event.keyCode=='13'){ // when you hit enter + window.event.preventDefault(); // don't make newline + popup.proceedClicked(); // go to the next window (or start the test or submit) + } + } this.popupResponse.appendChild(textArea); textArea.focus(); } else if (node.type == 'checkbox') {