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/10746
Vanessaad68e6cbd951
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.tsindex 039bb581ca..144f4a6e82 100644--- a/app/src/menus/protyle.ts+++ b/app/src/menus/protyle.ts@@ -55,6 +55,7 @@ import {renderAssetsPreview} from "../asset/renderAssets";import {upDownHint} from "../util/upDownHint";import {hintRenderAssets} from "../protyle/hint/extend";import {Menu} from "../plugin/Menu";+import {getFirstBlock} from "../protyle/wysiwyg/getBlock";const renderAssetList = (element: Element, k: string, position: IPosition, exts: string[] = []) => {fetchPost("/api/search/searchAsset", {@@ -834,8 +835,14 @@ export const zoomOut = (options: {if (options.focusId) {const focusElement = options.protyle.wysiwyg.element.querySelector(`[data-node-id="${options.focusId}"]`);if (focusElement) {- focusBlock(focusElement);- focusElement.scrollIntoView();+ // 退出聚焦后块在折叠中 https://github.com/siyuan-note/siyuan/issues/10746+ let showElement = focusElement+ while (showElement.getBoundingClientRect().height === 0) {+ showElement = showElement.parentElement;+ }+ showElement = getFirstBlock(showElement);+ focusBlock(showElement);+ showElement.scrollIntoView();} else if (options.id === options.protyle.block.rootID) { // 聚焦返回后,该块是动态加载的,但是没加载出来fetchPost("/api/filetree/getDoc", {id: options.focusId,