Send message on pressing enter
This commit is contained in:
parent
f1d053bf29
commit
e618c20dc8
@ -68,3 +68,10 @@ function addChatMessage(data) {
|
||||
|
||||
document.getElementById('messages_received').append(messageDiv);
|
||||
}
|
||||
|
||||
document.getElementById('message_input').onkeydown = function (e) {
|
||||
if (e.key === "Enter") {
|
||||
sendMessage();
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user