An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: Preserve embed focus when undoing leading line breaks https://github.com/siyuan-note/siyuan/issues/13869
Daniel2c61b47efa09
diff --git a/app/src/protyle/wysiwyg/enter.ts b/app/src/protyle/wysiwyg/enter.tsindex 2cf93a9b94..1121c95e67 100644--- a/app/src/protyle/wysiwyg/enter.ts+++ b/app/src/protyle/wysiwyg/enter.ts@@ -227,6 +227,7 @@ export const enter = async (blockElement: HTMLElement, range: Range, protyle: IP// 段首换行if (editableElement.textContent !== "" && range.toString() === "" && position.start === 0) {+ const undoFocusContext = getUndoFocusContext(protyle.wysiwyg.element, range);let newElement;const previousBlockElement = getPreviousBlockSibling(blockElement);if (previousBlockElement?.getAttribute("data-type") === "NodeHeading" &&@@ -246,6 +247,7 @@ export const enter = async (blockElement: HTMLElement, range: Range, protyle: IPconst undoOperations: IOperation[] = [{action: "delete",id: newId,+ context: undoFocusContext,}];if (blockElement.parentElement.classList.contains("sb") &&blockElement.parentElement.getAttribute("data-sb-layout") === "col") {