diff --git a/web/map.js b/web/map.js index 377ce06b..8d08cfa9 100644 --- a/web/map.js +++ b/web/map.js @@ -221,7 +221,8 @@ DynMap.prototype = { .keydown(function(event) { if (event.keyCode == '13') { event.preventDefault(); - sendChat(this.value); + sendChat(chatinput.val()); + chatinput.val(''); } }) .appendTo(chat);