diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-11-06 02:05:16 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-11-06 02:05:16 +0900 |
| commit | 6d8ea89f09e9fdc8df691bdc7d2304beda87a9f8 (patch) | |
| tree | 863af57819f1751663407c21642bab9098a759b3 /src/client | |
| parent | Better error code (diff) | |
| download | sharkey-6d8ea89f09e9fdc8df691bdc7d2304beda87a9f8.tar.gz sharkey-6d8ea89f09e9fdc8df691bdc7d2304beda87a9f8.tar.bz2 sharkey-6d8ea89f09e9fdc8df691bdc7d2304beda87a9f8.zip | |
Resolve #3126
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/app/common/views/components/autocomplete.vue | 5 | ||||
| -rw-r--r-- | src/client/app/common/views/directives/autocomplete.ts | 2 |
2 files changed, 6 insertions, 1 deletions
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; } |