Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/16051

Vanessafbc166e7b46b
diff --git a/app/src/protyle/wysiwyg/callout.ts b/app/src/protyle/wysiwyg/callout.ts
index 77e62781a2..6f4f2af414 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)"
}, {