Merge pull request #785 from StCyr/bugfix/noid/do-not-post-on-enter

FIX: Hitting 'Enter' without the shift key pressed should not post the message
feature/797/interact-with-remote-item
Maxence Lange 2019-10-04 18:56:55 -01:00 zatwierdzone przez GitHub
commit d82cb4906b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -49,7 +49,7 @@
<vue-tribute :options="tributeOptions">
<!-- eslint-disable-next-line vue/valid-v-model -->
<div ref="composerInput" v-contenteditable:post.dangerousHTML="canType && !loading" class="message"
placeholder="What would you like to share?" :class="{'icon-loading': loading}" @keyup.enter="keyup"
placeholder="What would you like to share?" :class="{'icon-loading': loading}" @keyup.prevent.enter="keyup"
@tribute-replaced="updatePostFromTribute" />
</vue-tribute>
<emoji-picker ref="emojiPicker" :search="search" class="emoji-picker-wrapper"
@ -777,7 +777,7 @@ export default {
return data
},
keyup(event) {
if (event.shiftKey) {
if (event.shiftKey || event.ctrlKey) {
this.createPost(event)
}
},