prevent empty chat-messages from being sent

This commit is contained in:
mluto 2013-01-14 17:11:56 +01:00
parent 44981e8907
commit 77401f2759

View file

@ -73,6 +73,8 @@ var chat = (function()
send: function() send: function()
{ {
var text = $("#chatinput").val(); var text = $("#chatinput").val();
if(text.trim().length == 0)
return;
this._pad.collabClient.sendMessage({"type": "CHAT_MESSAGE", "text": text}); this._pad.collabClient.sendMessage({"type": "CHAT_MESSAGE", "text": text});
$("#chatinput").val(""); $("#chatinput").val("");
}, },