diff --git a/templates/quest.html b/templates/quest.html
index 6f673d7..4d24f4e 100644
--- a/templates/quest.html
+++ b/templates/quest.html
@@ -29,9 +29,10 @@
});
mtarea = document.getElementById('messageTextarea');
mtarea.addEventListener('keypress', function(event) {
- if (event.key == 'Enter') {
- text = mtarea.value;
+ if (event.key == 'Enter' && !event.shiftKey) {
+ text = mtarea.value.trim();
mtarea.value = '';
+ if (text == '') { return; }
socket.emit('message', {message: text, name: 'Anonymous', room: '{{ room_id }}'});
}
});