mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 07:25:46 +01:00
closes #3532
This commit is contained in:
@@ -186,6 +186,7 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|||||||
Chats.sendMessage = function(toUid, inputEl) {
|
Chats.sendMessage = function(toUid, inputEl) {
|
||||||
var msg = inputEl.val();
|
var msg = inputEl.val();
|
||||||
if (msg.length) {
|
if (msg.length) {
|
||||||
|
inputEl.val('');
|
||||||
msg = msg + '\n';
|
msg = msg + '\n';
|
||||||
socket.emit('modules.chats.send', {
|
socket.emit('modules.chats.send', {
|
||||||
touid:toUid,
|
touid:toUid,
|
||||||
@@ -198,7 +199,6 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
|||||||
return app.alertError(err.message);
|
return app.alertError(err.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
inputEl.val('');
|
|
||||||
sounds.play('chat-outgoing');
|
sounds.play('chat-outgoing');
|
||||||
Chats.notifyTyping(toUid, false);
|
Chats.notifyTyping(toUid, false);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -455,6 +455,7 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
|
|||||||
|
|
||||||
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'), input);
|
Chats.sendMessage(chatModal.attr('touid'), input);
|
||||||
|
input.focus();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user