From 324bec41c4ff03dce8abecfa9e5bd0d765fee834 Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Fri, 17 Jan 2014 20:10:09 -0500 Subject: [PATCH] chain --- public/src/modules/chat.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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; });