logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 5478192e2074fc4c4f2d9ef1a751618c89fb3582
parent 246593970b739138f518e1aa9545fd2f5168eb2a
Author: tusooa <tusooa@kazv.moe>
Date:   Sat, 21 Jan 2023 14:50:57 -0500

Make keys work as intended when there is no suggestions

Diffstat:

Msrc/components/emoji_input/emoji_input.js8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 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