prevent empty chat-messages from being sent

pull/1355/head
mluto 2013-01-14 17:11:56 +01:00
parent 44981e8907
commit 77401f2759
1 changed files with 2 additions and 0 deletions

View File

@ -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("");
},