changeset 363:17c37d62d942 Dev_main

Merge
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Fri, 27 Nov 2015 12:21:24 +0000
parents 1f192370f126 (diff) 77d1cb86334b (current diff)
children 30742d67704f
files
diffstat 1 files changed, 1 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/core.js	Fri Nov 27 12:09:49 2015 +0000
+++ b/core.js	Fri Nov 27 12:21:24 2015 +0000
@@ -139,13 +139,6 @@
 		$(window).keypress(function(e){
 			if (e.keyCode == 13 && popup.popup.style.visibility == 'visible')
 			{
-				// Enter key pressed
-				var textarea = $(popup.popupContent).find('textarea');
-				if (textarea.length != 0)
-				{
-					if (textarea[0] == document.activeElement)
-					{return;}
-				}
 				popup.buttonProceed.onclick();
 			}
 		});
@@ -158,6 +151,7 @@
 		blank.style.zIndex = -2;
 		blank.style.visibility = 'hidden';
 		this.buttonPrevious.style.visibility = 'inherit';
+		$(window).keypress(function(e){});
 	};
 	
 	this.postNode = function() {
@@ -190,12 +184,6 @@
 				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') {