From bbff321019d1bd533a976ec5761841b760408a08 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 1 Apr 2024 22:41:10 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/10058 --- app/src/menus/protyle.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index 3f6eadc90..5e39c93ce 100644 --- a/app/src/menus/protyle.ts +++ b/app/src/menus/protyle.ts @@ -840,7 +840,12 @@ export const zoomOut = (options: { while (showElement.getBoundingClientRect().height === 0) { showElement = showElement.parentElement; } - showElement = getFirstBlock(showElement); + if (showElement.classList.contains("protyle-wysiwyg")) { + // 闪卡退出聚焦元素被隐藏 https://github.com/siyuan-note/siyuan/issues/10058#issuecomment-2029524211 + showElement = focusElement.previousElementSibling || focusElement.nextElementSibling; + } else { + showElement = getFirstBlock(showElement); + } focusBlock(showElement); showElement.scrollIntoView(); } else if (options.id === options.protyle.block.rootID) { // 聚焦返回后,该块是动态加载的,但是没加载出来