diff --git a/src/client/app/common/views/components/autocomplete.vue b/src/client/app/common/views/components/autocomplete.vue index 4cf44a23ae..661d340863 100644 --- a/src/client/app/common/views/components/autocomplete.vue +++ b/src/client/app/common/views/components/autocomplete.vue @@ -215,6 +215,11 @@ export default Vue.extend({ } } } else if (this.type == 'emoji') { + if (this.q == null || this.q == '') { + this.emojis = this.emojiDb.filter(x => x.isCustomEmoji && !x.aliasOf); + return; + } + const matched = []; const max = 30; diff --git a/src/client/app/common/views/directives/autocomplete.ts b/src/client/app/common/views/directives/autocomplete.ts index ca0c792121..069aeb2783 100644 --- a/src/client/app/common/views/directives/autocomplete.ts +++ b/src/client/app/common/views/directives/autocomplete.ts @@ -109,7 +109,7 @@ class Autocomplete { if (isEmoji && opened == false) { const emoji = text.substr(emojiIndex + 1); - if (emoji != '' && emoji.match(/^[\+\-a-z0-9_]+$/)) { + if (!emoji.includes(' ')) { this.open('emoji', emoji); opened = true; }