summaryrefslogtreecommitdiff
path: root/src/static
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2013-01-14 14:25:46 -0800
committerJohn McLear <john@mclear.co.uk>2013-01-14 14:25:46 -0800
commitbb9097e528135175217f80e3db5ec0fb0f206c92 (patch)
treea6ce7a2af95b74bec7287909204797ba0855acce /src/static
parent92325a3780f4c7d99e319298e0b63f8711d30349 (diff)
parentadf5c97664172ef61c3817167d53f4a3f109cc58 (diff)
downloadetherpad-lite-bb9097e528135175217f80e3db5ec0fb0f206c92.zip
Merge pull request #1355 from mluto/chat-no-empty-line
prevent empty chat-messages from being sent
Diffstat (limited to 'src/static')
-rw-r--r--src/static/js/chat.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/static/js/chat.js b/src/static/js/chat.js
index 01adc34e..4699d444 100644
--- a/src/static/js/chat.js
+++ b/src/static/js/chat.js
@@ -75,6 +75,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("");
},