diff --git a/public/src/modules/chat.js b/public/src/modules/chat.js index 82855d0d9f..6aecfe0271 100644 --- a/public/src/modules/chat.js +++ b/public/src/modules/chat.js @@ -200,15 +200,13 @@ define(['taskbar', 'string'], function(taskbar, S) { } function addSendHandler(chatModal) { - chatModal.find('#chat-message-input').off('keypress'); - chatModal.find('#chat-message-input').on('keypress', function(e) { + chatModal.find('#chat-message-input').off('keypress').on('keypress', function(e) { if(e.which === 13) { sendMessage(chatModal); } }); - chatModal.find('#chat-message-send-btn').off('click'); - chatModal.find('#chat-message-send-btn').on('click', function(e){ + chatModal.find('#chat-message-send-btn').off('click').on('click', function(e){ sendMessage(chatModal); return false; });