Prevent empty messages incoming to system.

This commit is contained in:
marcins78@gmail.com
2011-11-04 10:40:46 +00:00
parent 333273823d
commit 0f11f23f3c

View File

@@ -51,8 +51,10 @@ var ChatBoxUI = Class.extend({
var code = (e.keyCode ? e.keyCode : e.which);
if (code == 13) {
var value = $(this).val();
that.sendMessage(value);
that.appendMessage("<b>Me:</b> " + that.escapeHtml(value));
if (value != "") {
that.sendMessage(value);
that.appendMessage("<b>Me:</b> " + that.escapeHtml(value));
}
$(this).val("");
}
});