always focus search when opening emoji picker

このコミットが含まれているのは:
Henry Jameson 2022-11-01 23:25:34 +02:00
コミット c1be65332f
1個のファイルの変更3行の追加1行の削除

ファイルの表示

@ -240,12 +240,14 @@ const EmojiPicker = {
}, },
onShowing () { onShowing () {
const oldContentLoaded = this.contentLoaded const oldContentLoaded = this.contentLoaded
this.$nextTick(() => {
this.$refs.search.focus()
})
this.contentLoaded = true this.contentLoaded = true
this.waitForDomAndInitializeLazyLoad() this.waitForDomAndInitializeLazyLoad()
this.filteredEmojiGroups = this.getFilteredEmojiGroups() this.filteredEmojiGroups = this.getFilteredEmojiGroups()
if (!oldContentLoaded) { if (!oldContentLoaded) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.search.focus()
if (this.defaultGroup) { if (this.defaultGroup) {
this.highlight(this.defaultGroup) this.highlight(this.defaultGroup)
} }