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

Vanessacab1545fed1e
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index 1dfa241d0b..db03aecb6b 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -2670,7 +2670,7 @@ export class WYSIWYG {
/// #if MOBILE
mobileBlur = true;
activeBlur();
- openMobileFileById(protyle.app, refBlockId, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
+ openMobileFileById(protyle.app, refBlockId, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL], "start");
/// #else
if (event.shiftKey) {
openFileById({
@@ -2678,7 +2678,8 @@ export class WYSIWYG {
id: refBlockId,
position: "bottom",
action,
- zoomIn
+ zoomIn,
+ scrollPosition: "start"
});
window.dispatchEvent(new KeyboardEvent("keydown", {key: "Escape"}));
} else if (event.altKey) {
@@ -2687,7 +2688,8 @@ export class WYSIWYG {
id: refBlockId,
position: "right",
action,
- zoomIn
+ zoomIn,
+ scrollPosition: "start"
});
} else if (ctrlIsPressed) {
openFileById({
@@ -2695,14 +2697,16 @@ export class WYSIWYG {
id: refBlockId,
keepCursor: true,
action: zoomIn ? [Constants.CB_GET_HL, Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL],
- zoomIn
+ zoomIn,
+ scrollPosition: "start"
});
} else {
openFileById({
app: protyle.app,
id: refBlockId,
action,
- zoomIn
+ zoomIn,
+ scrollPosition: "start"
});
}
/// #endif
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index c5a348526b..1904a805f4 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -1960,7 +1960,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
app: protyle.app,
id,
action,
- zoomIn
+ zoomIn,
+ scrollPosition: "start"
});
});
event.preventDefault();
@@ -1974,7 +1975,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
id,
action: zoomIn ? [Constants.CB_GET_HL, Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL],
keepCursor: true,
- zoomIn
+ zoomIn,
+ scrollPosition: "start"
});
});
event.preventDefault();
@@ -1990,7 +1992,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
id,
position: "right",
action,
- zoomIn
+ zoomIn,
+ scrollPosition: "start"
});
});
event.preventDefault();
@@ -2006,7 +2009,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
id,
position: "bottom",
action,
- zoomIn
+ zoomIn,
+ scrollPosition: "start"
});
});
event.preventDefault();