From 01ff597e65fed5e558bce334c62b26fffa72c834 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 3 Aug 2023 03:57:27 +0000 Subject: [PATCH] fix emoji picker --- .../src/components/MkEmojiPickerDialog.vue | 14 +++++++++++--- packages/frontend/src/components/MkPopupMenu.vue | 2 +- packages/frontend/src/scripts/reaction-picker.ts | 6 +++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/packages/frontend/src/components/MkEmojiPickerDialog.vue b/packages/frontend/src/components/MkEmojiPickerDialog.vue index 855d82c064..e1128b2fdb 100644 --- a/packages/frontend/src/components/MkEmojiPickerDialog.vue +++ b/packages/frontend/src/components/MkEmojiPickerDialog.vue @@ -12,10 +12,11 @@ SPDX-License-Identifier: AGPL-3.0-only :transparentBg="true" :manualShowing="manualShowing" :src="src" - @click="modal?.close()" + @click="click" @opening="opening" @close="emit('close')" @closed="emit('closed')" + @hide="emit('hide')" > (); const modal = shallowRef>(); @@ -58,7 +61,7 @@ const picker = shallowRef>(); function chosen(emoji: any) { emit('done', emoji); - modal.value?.close(); + if (props.manualShowing === null) modal.value?.close(); } function opening() { @@ -70,6 +73,11 @@ function opening() { picker.value?.focus(); }, 10); } + +function click() { + emit('click'); + if (props.manualShowing === null) modal.value?.close(); +}