Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/14399

Vanessa602a37c72ae0
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts
index 218f12b0e1..5647951d44 100644
--- a/app/src/menus/protyle.ts
+++ b/app/src/menus/protyle.ts
@@ -949,7 +949,7 @@ export const zoomOut = (options: {
if (typeof options.reload === "undefined") {
options.reload = false;
}
- const blockPanelElement = hasClosestByClassName(options.protyle.element, "block__popover", true);
+ const blockPanelElement = hasClosestByClassName(options.protyle.element, "block__popover", true);
if (blockPanelElement) {
const pingElement = blockPanelElement.querySelector('[data-type="pin"]');
if (pingElement && blockPanelElement.getAttribute("data-pin") !== "true") {
@@ -1026,6 +1026,18 @@ export const zoomOut = (options: {
setTimeout(() => {
resizeObserver.disconnect();
}, 1000 * 3);
+ } else if (!options.focusId) {
+ fetchPost("/api/filetree/getDoc", {
+ id: options.protyle.block.rootID,
+ size: window.siyuan.config.editor.dynamicLoadBlocks,
+ }, getFocusResponse => {
+ onGet({
+ data: getFocusResponse,
+ protyle: options.protyle,
+ action: options.isPushBack ? [Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS, Constants.CB_GET_UNUNDO],
+ });
+ });
+ return;
} else if (options.id === options.protyle.block.rootID) { // 聚焦返回后,该块是动态加载的,但是没加载出来
fetchPost("/api/filetree/getDoc", {
id: options.focusId,