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: https://github.com/siyuan-note/siyuan/issues/12679
Vanessa4756557c1703
diff --git a/app/src/util/highlightById.ts b/app/src/util/highlightById.tsindex 08f97f3b33..1fab1ff399 100644--- a/app/src/util/highlightById.ts+++ b/app/src/util/highlightById.ts@@ -1,5 +1,5 @@import {hasClosestBlock, hasClosestByAttribute} from "../protyle/util/hasClosest";-import {getEditorRange} from "../protyle/util/selection";+import {focusByRange, getEditorRange} from "../protyle/util/selection";export const bgFade = (element: Element) => {element.classList.add("protyle-wysiwyg--hl");@@ -56,7 +56,8 @@ export const scrollCenter = (protyle: IProtyle, nodeElement?: Element, top = fal(blockElement.querySelector(".av__row--header").getAttribute("style")?.indexOf("transform") > -1 || blockElement.querySelector(".av__row--footer").getAttribute("style")?.indexOf("transform") > -1)) {return;}-+ // 撤销时 br 插入删除会导致 rang 被修改 https://github.com/siyuan-note/siyuan/issues/12679+ const cloneRange = range.cloneRange();const br2Element = document.createElement("br");range.insertNode(br2Element);const editorElement = protyle.contentElement;@@ -71,6 +72,7 @@ export const scrollCenter = (protyle: IProtyle, nodeElement?: Element, top = faleditorElement.scroll({top: scrollTop, behavior});}br2Element.remove();+ focusByRange(cloneRange);return;}}