always focus search when opening emoji picker

This commit is contained in:
Henry Jameson 2022-11-01 23:25:34 +02:00
parent 11f9a7ba27
commit c1be65332f
1 changed files with 3 additions and 1 deletions

View File

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