1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-04 01:38:54 +09:00

fix(frontend): 채팅에서 이모지 선택기를 열 수 없던 문제

This commit is contained in:
NoriDev 2024-03-25 13:36:38 +09:00
parent 73fd06e567
commit 9d2c565d89

View File

@ -37,7 +37,7 @@ SPDX-License-Identifier: AGPL-3.0-only
import { computed, onMounted, ref, shallowRef, watch } from 'vue';
import * as Misskey from 'cherrypick-js';
import autosize from 'autosize';
// import insertTextAtCursor from 'insert-text-at-cursor';
import insertTextAtCursor from 'insert-text-at-cursor';
import { formatTimeString } from '@/scripts/format-time-string.js';
import { selectFile } from '@/scripts/select-file.js';
import * as os from '@/os.js';
@ -48,6 +48,7 @@ import { i18n } from '@/i18n.js';
import { Autocomplete } from '@/scripts/autocomplete.js';
import { uploadFile } from '@/scripts/upload.js';
import { miLocalStorage } from '@/local-storage.js';
import { emojiPicker } from '@/scripts/emoji-picker.js';
import MkLoading from '@/components/global/MkLoading.vue';
const props = defineProps<{
@ -218,7 +219,15 @@ function deleteDraft() {
}
async function insertEmoji(ev: MouseEvent) {
await os.openEmojiPicker(ev.currentTarget ?? ev.target, {}, textEl.value);
emojiPicker.show(
ev.currentTarget ?? ev.target,
emoji => {
insertTextAtCursor(textEl.value, emoji);
},
() => {
focus();
},
);
}
onMounted(() => {