From 77401f275960b68ec1bf8cbd330201d08ff33731 Mon Sep 17 00:00:00 2001 From: mluto Date: Mon, 14 Jan 2013 17:11:56 +0100 Subject: prevent empty chat-messages from being sent --- src/static/js/chat.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/static') diff --git a/src/static/js/chat.js b/src/static/js/chat.js index 79224e80..fd286deb 100644 --- a/src/static/js/chat.js +++ b/src/static/js/chat.js @@ -73,6 +73,8 @@ var chat = (function() send: function() { var text = $("#chatinput").val(); + if(text.trim().length == 0) + return; this._pad.collabClient.sendMessage({"type": "CHAT_MESSAGE", "text": text}); $("#chatinput").val(""); }, -- cgit v1.2.3