EmojiPicker: Workaround to search immediately on mobile

See https://github.com/vuejs/vue/pull/9814
This commit is contained in:
Lain Soykaf 2022-06-12 13:38:12 +02:00
parent 15229d27b4
commit 9c8738ff22
2 changed files with 4 additions and 2 deletions

View File

@ -6,6 +6,7 @@ import {
faStickyNote, faStickyNote,
faSmileBeam faSmileBeam
} from '@fortawesome/free-solid-svg-icons' } from '@fortawesome/free-solid-svg-icons'
import { trim } from 'lodash'
library.add( library.add(
faBoxOpen, faBoxOpen,
@ -176,7 +177,7 @@ const EmojiPicker = {
filteredEmoji () { filteredEmoji () {
return filterByKeyword( return filterByKeyword(
this.$store.state.instance.customEmoji || [], this.$store.state.instance.customEmoji || [],
this.keyword trim(this.keyword)
) )
}, },
customEmojiBuffer () { customEmojiBuffer () {
@ -197,7 +198,7 @@ const EmojiPicker = {
id: 'standard', id: 'standard',
text: this.$t('emoji.unicode'), text: this.$t('emoji.unicode'),
icon: 'box-open', icon: 'box-open',
emojis: filterByKeyword(standardEmojis, this.keyword) emojis: filterByKeyword(standardEmojis, trim(this.keyword))
} }
] ]
}, },

View File

@ -47,6 +47,7 @@
type="text" type="text"
class="form-control" class="form-control"
:placeholder="$t('emoji.search_emoji')" :placeholder="$t('emoji.search_emoji')"
@input="$event.target.composing = false"
> >
</div> </div>
<div <div