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: fix https://github.com/siyuan-note/siyuan/issues/5470
Vanessa19b36b46f069
diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.tsindex 628d1ca8ba..c8972c6846 100644--- a/app/src/protyle/hint/index.ts+++ b/app/src/protyle/hint/index.ts@@ -1,9 +1,9 @@import {Constants} from "../../constants";import {hasClosestBlock, hasClosestByAttribute, hasClosestByClassName, hasClosestByMatchTag} from "../util/hasClosest";import {+ focusBlock,focusByRange,focusByWbr,- focusSideBlock,getEditorRange,getSelectionOffset,getSelectionPosition@@ -599,7 +599,7 @@ ${unicode2Emoji(emoji.unicode, true)}</button>`;window.siyuan.menus.menu.element.querySelector('[data-id="assetSubMenu"]').classList.add("b3-menu__item--show");window.siyuan.menus.menu.element.querySelectorAll("input")[0].focus();} else if (value === "---") {- focusSideBlock(nodeElement);+ focusBlock(nodeElement);} else {focusByWbr(nodeElement, range);}diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.tsindex a2d27a8776..d6c0a25ea1 100644--- a/app/src/protyle/wysiwyg/input.ts+++ b/app/src/protyle/wysiwyg/input.ts@@ -5,7 +5,7 @@ import * as dayjs from "dayjs";import {transaction, updateTransaction} from "./transaction";import {mathRender} from "../markdown/mathRender";import {highlightRender} from "../markdown/highlightRender";-import {getContenteditableElement, getNextBlock} from "./getBlock";+import {getContenteditableElement, getNextBlock, isNotEditBlock} from "./getBlock";import {genEmptyBlock} from "../../block/util";import {blockRender} from "../markdown/blockRender";import {hideElements} from "../ui/hideElements";@@ -80,10 +80,12 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range:let html = blockElement.outerHTML;let todoOldHTML = "";if (editElement.textContent === "---" && !blockElement.classList.contains("code-block")) {- html = `<div data-node-id="${id}" data-type="NodeThematicBreak" class="hr"><div></div></div>`;+ html = `<div data-node-id="${id}" data-type="NodeThematicBreak" class="hr"><div><wbr></div></div>`;const nextBlockElement = getNextBlock(editElement);if (nextBlockElement) {- focusBlock(nextBlockElement);+ if (!isNotEditBlock(nextBlockElement)) {+ focusBlock(nextBlockElement);+ }} else {html += genEmptyBlock(false, true);}