Mercurial > hg > webaudioevaluationtool
changeset 825:8fb8f3c1acf8
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.
author | Brecht De Man <BrechtDeMan@users.noreply.github.com> |
---|---|
date | Mon, 23 Nov 2015 16:04:47 +0000 |
parents | cfe755cc2bc2 |
children | 1b6fa37d46a4 |
files | core.js |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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') {