Mercurial > hg > webaudioevaluationtool
diff core.js @ 747:6fb0b21d6f85
Hitting enter in any pop-up goes to the next window (or submits, or starts the test)
author | Brecht De Man <BrechtDeMan@users.noreply.github.com> |
---|---|
date | Wed, 18 Nov 2015 11:08:52 +0100 |
parents | 50c651d27330 |
children | b9785aaab2a4 |
line wrap: on
line diff
--- a/core.js Fri Nov 13 17:59:39 2015 +0000 +++ b/core.js Wed Nov 18 11:08:52 2015 +0100 @@ -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') {