comparison core.js @ 1970:cf08f2881a39

Hitting enter in any pop-up goes to the next window (or submits, or starts the test)
author Brecht De Man <b.deman@qmul.ac.uk>
date Wed, 18 Nov 2015 11:08:52 +0100
parents 82f43919f385
children b9785aaab2a4
comparison
equal deleted inserted replaced
1969:025867e74b01 1970:cf08f2881a39
188 case 'huge': 188 case 'huge':
189 textArea.cols = "50"; 189 textArea.cols = "50";
190 textArea.rows = "10"; 190 textArea.rows = "10";
191 break; 191 break;
192 } 192 }
193 document.onkeydown=function(){
194 if(window.event.keyCode=='13'){ // when you hit enter
195 window.event.preventDefault(); // don't make newline
196 popup.proceedClicked(); // go to the next window (or start the test or submit)
197 }
198 }
193 this.popupResponse.appendChild(textArea); 199 this.popupResponse.appendChild(textArea);
194 textArea.focus(); 200 textArea.focus();
195 } else if (node.type == 'checkbox') { 201 } else if (node.type == 'checkbox') {
196 this.popupTitle.textContent = node.statement; 202 this.popupTitle.textContent = node.statement;
197 var optHold = this.popupResponse; 203 var optHold = this.popupResponse;