An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: fix https://github.com/siyuan-note/siyuan/issues/11729
Vanessa61b73e2c5984
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.tsindex b5374bc90e..aba28d2e1f 100644--- a/app/src/protyle/wysiwyg/keydown.ts+++ b/app/src/protyle/wysiwyg/keydown.ts@@ -256,7 +256,11 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {}} else if (protyle.title && protyle.title.editElement &&(protyle.wysiwyg.element.firstElementChild.getAttribute("data-eof") === "1" || protyle.contentElement.scrollTop === 0)) {- protyle.title.editElement.focus();+ const titleRange = setLastNodeRange(protyle.title.editElement, range, false);+ titleRange.collapse(false);+ focusByRange(titleRange);+ event.stopPropagation();+ event.preventDefault();} else if (protyle.contentElement.scrollTop !== 0) {protyle.contentElement.scrollTop = 0;protyle.scroll.lastScrollTop = 8;@@ -650,7 +654,11 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {if (protyle.title && protyle.title.editElement &&(protyle.wysiwyg.element.firstElementChild.getAttribute("data-eof") === "1" ||protyle.contentElement.scrollTop === 0)) {- protyle.title.editElement.focus();+ const titleRange = setLastNodeRange(protyle.title.editElement, range, false);+ titleRange.collapse(false);+ focusByRange(titleRange);+ event.stopPropagation();+ event.preventDefault();} else {protyle.contentElement.scrollTop = 0;protyle.scroll.lastScrollTop = 8;