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/15670

Vanessa4a5237dbd0b8
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts
index f73120965e..1c0138e461 100644
--- a/app/src/menus/protyle.ts
+++ b/app/src/menus/protyle.ts
@@ -66,6 +66,7 @@ import {showMessage} from "../dialog/message";
import {img3115} from "../boot/compatibleVersion";
import {hideTooltip} from "../dialog/tooltip";
import {clearSelect} from "../protyle/util/clearSelect";
+import {scrollCenter} from "../util/highlightById";
const renderAssetList = (element: Element, k: string, position: IPosition, exts: string[] = []) => {
fetchPost("/api/search/searchAsset", {
@@ -1020,7 +1021,7 @@ export const zoomOut = (options: {
}
focusBlock(showElement);
const resizeObserver = new ResizeObserver(() => {
- focusElement.scrollIntoView();
+ scrollCenter(options.protyle, focusElement, true, "smooth");
});
resizeObserver.observe(options.protyle.wysiwyg.element);
setTimeout(() => {