From fbc166e7b46bb400483ddbd9f9352ae89c6708f7 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 9 Dec 2025 22:41:49 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/16051 --- app/src/protyle/wysiwyg/callout.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/src/protyle/wysiwyg/callout.ts b/app/src/protyle/wysiwyg/callout.ts index 77e62781a..6f4f2af41 100644 --- a/app/src/protyle/wysiwyg/callout.ts +++ b/app/src/protyle/wysiwyg/callout.ts @@ -59,11 +59,26 @@ export const updateCalloutType = (titleElement: HTMLElement, protyle: IProtyle) dialog.bindInput(textElements[1], () => { btnElements[1].dispatchEvent(new CustomEvent("click")); }); + textElements[0].addEventListener("keydown", (event) => { + if (event.isComposing) { + return; + } + if (event.key.startsWith("Arrow")) { + dialog.element.querySelector(".b3-form__icona-icon").dispatchEvent(new CustomEvent("click")); + textElements[0].blur(); + event.preventDefault(); + event.stopPropagation(); + } + }); textElements[0].focus(); textElements[0].select(); let updateIcon = ""; dialog.element.querySelector(".b3-form__icona-icon").addEventListener("click", (event) => { const menu = new Menu(); + if (menu.isOpen) { + menu.close(); + return; + } [{ icon: "✏️", type: "Note", color: "var(--b3-theme-primary)" }, {