Send message on pressing enter #21

Merged
H4CK3R-01 merged 1 commits from chat_fix into main 2021-06-11 06:50:58 +00:00
Showing only changes of commit e618c20dc8 - Show all commits

View File

@ -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();
}
};