From 8eb83b160442e4bdb89e15a8908dfaa760dc181e Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 28 Oct 2023 16:34:44 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/9527 --- app/src/block/util.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/src/block/util.ts b/app/src/block/util.ts index b9111ac0c..c31b4ae58 100644 --- a/app/src/block/util.ts +++ b/app/src/block/util.ts @@ -7,6 +7,8 @@ import {scrollCenter} from "../util/highlightById"; import {Constants} from "../constants"; import {hideElements} from "../protyle/ui/hideElements"; import {blockRender} from "../protyle/render/blockRender"; +import {fetchPost} from "../util/fetch"; +import {zoomOut} from "../menus/protyle"; export const cancelSB = (protyle: IProtyle, nodeElement: Element) => { const doOperations: IOperation[] = []; @@ -80,6 +82,15 @@ export const jumpToParentNext = (protyle: IProtyle, nodeElement: Element) => { if (nextElement) { focusBlock(nextElement); scrollCenter(protyle, nextElement); + } else { + fetchPost("/api/block/getParentNextChildID", {id: nodeElement.getAttribute("data-node-id")}, (response) => { + if (response.data.id) { + zoomOut({ + protyle, + id: response.data.id, + }) + } + }) } } };