diff --git a/website/client/src/components/groups/chat.vue b/website/client/src/components/groups/chat.vue index 504817cea0..e2c341b525 100644 --- a/website/client/src/components/groups/chat.vue +++ b/website/client/src/components/groups/chat.vue @@ -27,7 +27,7 @@ @keydown.tab="handleTab($event)" @keydown.up="selectPreviousAutocomplete($event)" @keydown.down="selectNextAutocomplete($event)" - @keydown.enter="selectAutocomplete($event)" + @keypress.enter="selectAutocomplete($event)" @keydown.esc="handleEscape($event)" @paste="disableMessageSendShortcut()" > @@ -247,8 +247,13 @@ export default { selectAutocomplete (e) { if (this.$refs.autocomplete.searchActive) { - e.preventDefault(); - this.$refs.autocomplete.makeSelection(); + if (this.$refs.autocomplete.selected !== null) { + e.preventDefault(); + this.$refs.autocomplete.makeSelection(); + } else { + // no autocomplete selected, newline instead + this.$refs.autocomplete.cancel(); + } } },