diff options
| author | tusooa <tusooa@kazv.moe> | 2023-01-21 14:50:57 -0500 |
|---|---|---|
| committer | tusooa <tusooa@kazv.moe> | 2023-01-21 14:50:57 -0500 |
| commit | 5478192e2074fc4c4f2d9ef1a751618c89fb3582 (patch) | |
| tree | 3afd7582a85415603330da818afc71d5b2260677 | |
| parent | 246593970b739138f518e1aa9545fd2f5168eb2a (diff) | |
Make keys work as intended when there is no suggestions
| -rw-r--r-- | src/components/emoji_input/emoji_input.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/components/emoji_input/emoji_input.js b/src/components/emoji_input/emoji_input.js index 3b0db786..8a8d098d 100644 --- a/src/components/emoji_input/emoji_input.js +++ b/src/components/emoji_input/emoji_input.js @@ -395,7 +395,9 @@ const EmojiInput = { } else if (this.highlighted < -1) { this.highlighted = len - 1 } - e.preventDefault() + if (len > 0) { + e.preventDefault() + } }, cycleForward (e) { const len = this.suggestions.length || 0 @@ -405,7 +407,9 @@ const EmojiInput = { this.highlighted = -1 this.input.focus() } - e.preventDefault() + if (len > 0) { + e.preventDefault() + } }, scrollIntoView () { const rootRef = this.$refs.picker.$el |
