mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 22:45:46 +01:00
closes #2070
This commit is contained in:
@@ -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;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user