Suppress enter key press so it doesn't reach the textbox

Thu, 08 Apr 2010 17:01:02 +0100

author
matthew@heavyhorse.vm.bytemark.co.uk
date
Thu, 08 Apr 2010 17:01:02 +0100
changeset 51
7f893f429760
parent 50
53bfdcb686f7
child 52
221c4db8ab40

Suppress enter key press so it doesn't reach the textbox

support-chat/js/supportchat.js file | annotate | diff | comparison | revisions
--- a/support-chat/js/supportchat.js	Thu Apr 08 16:41:23 2010 +0100
+++ b/support-chat/js/supportchat.js	Thu Apr 08 17:01:02 2010 +0100
@@ -221,7 +221,10 @@
 	$("#support-question-submit").click(on_question_submit);
 	$("#support-input").keypress(function (event) {
 		if(event.keyCode == 13)
+		{
+			event.preventDefault();
 			$("#support-send-button").click();
+		}
 	});
 	$("#support-offline-submit-button").click(function ()
 	{

mercurial