diff --git a/app/src/mobile/dock/MobileOutline.ts b/app/src/mobile/dock/MobileOutline.ts index 8cc5d5711..e036b0841 100644 --- a/app/src/mobile/dock/MobileOutline.ts +++ b/app/src/mobile/dock/MobileOutline.ts @@ -104,7 +104,9 @@ export class MobileOutline extends Model { } } else { checkFold(id, (zoomIn) => { - openMobileFileById(options.app, id, zoomIn ? [Constants.CB_GET_HL, Constants.CB_GET_ALL, Constants.CB_GET_HTML, Constants.CB_GET_OUTLINE] : [Constants.CB_GET_HL, Constants.CB_GET_OUTLINE, Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML]); + openMobileFileById(options.app, id, zoomIn ? [Constants.CB_GET_HL, Constants.CB_GET_ALL, Constants.CB_GET_HTML, Constants.CB_GET_OUTLINE] : + [Constants.CB_GET_HL, Constants.CB_GET_OUTLINE, Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML], + "start"); }); } }, diff --git a/app/src/mobile/editor.ts b/app/src/mobile/editor.ts index 4911e0be2..c24918470 100644 --- a/app/src/mobile/editor.ts +++ b/app/src/mobile/editor.ts @@ -42,7 +42,7 @@ export const openMobileFileById = (app: App, id: string, action: TProtyleAction[ if (blockElement) { pushBack(); if (action.includes(Constants.CB_GET_HL)) { - highlightById(window.siyuan.mobile.editor.protyle, id); + highlightById(window.siyuan.mobile.editor.protyle, id, scrollPosition); } else { scrollCenter(window.siyuan.mobile.editor.protyle, blockElement, scrollPosition); } @@ -61,6 +61,7 @@ export const openMobileFileById = (app: App, id: string, action: TProtyleAction[ const protyleOptions: IProtyleOptions = { blockId: id, rootId: data.data.rootID, + scrollPosition, action, render: { scroll: true, @@ -105,6 +106,7 @@ export const openMobileFileById = (app: App, id: string, action: TProtyleAction[ data: getResponse, protyle: window.siyuan.mobile.editor.protyle, action, + scrollPosition, afterCB() { app.plugins.forEach(item => { item.eventBus.emit("switch-protyle", {protyle: window.siyuan.mobile.editor.protyle});