v1.18.x
barisusakli 10 years ago
parent 807d4b7e2e
commit 32e08ba419

@ -43,7 +43,7 @@ define('forum/chats', ['string', 'sounds', 'forum/infinitescroll'], function(S,
}); });
inputEl.on('keypress', function(e) { inputEl.on('keypress', function(e) {
if(e.which === 13) { if(e.which === 13 && !e.shiftKey) {
Chats.sendMessage(Chats.getRecipientUid(), inputEl); Chats.sendMessage(Chats.getRecipientUid(), inputEl);
} }
}); });

@ -353,8 +353,8 @@ define('chat', ['taskbar', 'string', 'sounds', 'forum/chats'], function(taskbar,
function addSendHandler(chatModal) { function addSendHandler(chatModal) {
var input = chatModal.find('#chat-message-input'); var input = chatModal.find('#chat-message-input');
input.off('keypress').on('keypress', function(e) { input.off('keypress').on('keypress', function(e) {
if(e.which === 13) { if (e.which === 13 && !e.shiftKey) {
Chats.sendMessage(chatModal.attr('touid'), chatModal.find('#chat-message-input')); Chats.sendMessage(chatModal.attr('touid'), input);
} }
}); });
@ -369,7 +369,7 @@ define('chat', ['taskbar', 'string', 'sounds', 'forum/chats'], function(taskbar,
}); });
chatModal.find('#chat-message-send-btn').off('click').on('click', function(e){ chatModal.find('#chat-message-send-btn').off('click').on('click', function(e){
Chats.sendMessage(chatModal.attr('touid'), chatModal.find('#chat-message-input')); Chats.sendMessage(chatModal.attr('touid'), input);
return false; return false;
}); });
} }

Loading…
Cancel
Save