fix: TypeError cannot read property 'focus' of undefined (#9765)
This commit is contained in:
@@ -4,12 +4,12 @@
|
|||||||
class="emoji-dialog bg-white shadow-lg dark:bg-slate-900 rounded-md border border-solid border-slate-75 dark:border-slate-800/50 box-content h-[300px] absolute right-0 -top-[95px] w-80 z-20"
|
class="emoji-dialog bg-white shadow-lg dark:bg-slate-900 rounded-md border border-solid border-slate-75 dark:border-slate-800/50 box-content h-[300px] absolute right-0 -top-[95px] w-80 z-20"
|
||||||
>
|
>
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<div class="emoji-search--wrap flex gap-2">
|
<div class="flex gap-2 emoji-search--wrap">
|
||||||
<input
|
<input
|
||||||
ref="searchbar"
|
ref="searchbar"
|
||||||
v-model="search"
|
v-model="search"
|
||||||
type="text"
|
type="text"
|
||||||
class="emoji-search--input focus:box-shadow-blue dark:focus:box-shadow-dark"
|
class="emoji-search--input focus:box-shadow-blue dark:focus:box-shadow-dark !mb-0"
|
||||||
:placeholder="$t('EMOJI.PLACEHOLDER')"
|
:placeholder="$t('EMOJI.PLACEHOLDER')"
|
||||||
/>
|
/>
|
||||||
<woot-button
|
<woot-button
|
||||||
@@ -174,7 +174,9 @@ export default {
|
|||||||
return categoryItem ? categoryItem.emojis[0].emoji : '';
|
return categoryItem ? categoryItem.emojis[0].emoji : '';
|
||||||
},
|
},
|
||||||
focusSearchInput() {
|
focusSearchInput() {
|
||||||
this.$refs.searchbar.focus();
|
this.$nextTick(() => {
|
||||||
|
this.$refs.searchbar.focus();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user