fix(EmojiPicker): 投稿フォームで絵文字ボタンを押すと従来通り絵文字ピッカーのウィンドウが開くように (MisskeyIO#296)
+ お知らせの絵文字ボタンでも同じ挙動になるように
This commit is contained in:
parent
5b883c1a54
commit
6de9a8ccbf
4 changed files with 20 additions and 12 deletions
|
@ -860,15 +860,10 @@ function insertMention() {
|
|||
async function insertEmoji(ev: MouseEvent) {
|
||||
textAreaReadOnly.value = true;
|
||||
|
||||
emojiPicker.show(
|
||||
ev.currentTarget ?? ev.target,
|
||||
emoji => {
|
||||
insertTextAtCursor(textareaEl.value, emoji);
|
||||
},
|
||||
() => {
|
||||
textAreaReadOnly.value = false;
|
||||
nextTick(() => focus());
|
||||
},
|
||||
os.openEmojiPicker(
|
||||
(ev.currentTarget ?? ev.target) as HTMLElement,
|
||||
{ asReactionPicker: false },
|
||||
textareaEl.value
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue