From feedc4895139b4c1a8a121622604614884b30b2e Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 8 Oct 2024 23:21:43 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/12711 --- app/src/mobile/dock/MobileBacklinks.ts | 4 ++-- app/src/mobile/dock/MobileOutline.ts | 2 +- app/src/mobile/index.ts | 2 +- app/src/mobile/menu/search.ts | 2 +- app/src/mobile/util/initFramework.ts | 2 +- app/src/protyle/wysiwyg/index.ts | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/mobile/dock/MobileBacklinks.ts b/app/src/mobile/dock/MobileBacklinks.ts index 74bf8c4b7..475673cef 100644 --- a/app/src/mobile/dock/MobileBacklinks.ts +++ b/app/src/mobile/dock/MobileBacklinks.ts @@ -44,14 +44,14 @@ export class MobileBacklinks { element: this.element.querySelector(".backlinkList") as HTMLElement, data: null, click(element: HTMLElement) { - openMobileFileById(app, element.getAttribute("data-node-id"), [Constants.CB_GET_CONTEXT]); + openMobileFileById(app, element.getAttribute("data-node-id"), [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]); } }); this.mTree = new Tree({ element: this.element.querySelector(".backlinkMList") as HTMLElement, data: null, click: (element) => { - openMobileFileById(app, element.getAttribute("data-node-id"), [Constants.CB_GET_CONTEXT]); + openMobileFileById(app, element.getAttribute("data-node-id"), [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]); }, }); this.element.addEventListener("click", (event) => { diff --git a/app/src/mobile/dock/MobileOutline.ts b/app/src/mobile/dock/MobileOutline.ts index e5c7f1c49..6b76fe2c3 100644 --- a/app/src/mobile/dock/MobileOutline.ts +++ b/app/src/mobile/dock/MobileOutline.ts @@ -37,7 +37,7 @@ export class MobileOutline { document.getElementById(id)?.scrollIntoView(); } else { checkFold(id, (zoomIn) => { - openMobileFileById(app, id, zoomIn ? [Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML]); + openMobileFileById(app, id, zoomIn ? [Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_HL, Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML]); }); } } diff --git a/app/src/mobile/index.ts b/app/src/mobile/index.ts index ad2b1c95d..104ece816 100644 --- a/app/src/mobile/index.ts +++ b/app/src/mobile/index.ts @@ -162,7 +162,7 @@ window.hideKeyboardToolbar = hideKeyboardToolbar; window.openFileByURL = (openURL) => { if (openURL && isSYProtocol(openURL)) { openMobileFileById(siyuanApp, getIdFromSYProtocol(openURL), - getSearch("focus", openURL) === "1" ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]); + getSearch("focus", openURL) === "1" ? [Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]); return true; } return false; diff --git a/app/src/mobile/menu/search.ts b/app/src/mobile/menu/search.ts index a779bbb29..97513139d 100644 --- a/app/src/mobile/menu/search.ts +++ b/app/src/mobile/menu/search.ts @@ -607,7 +607,7 @@ const initSearchEvent = (app: App, element: Element, config: Config.IUILayoutTab preventScroll(window.siyuan.mobile.editor.protyle); } checkFold(id, (zoomIn) => { - openMobileFileById(app, id, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]); + openMobileFileById(app, id, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]); }); closePanel(); } else { diff --git a/app/src/mobile/util/initFramework.ts b/app/src/mobile/util/initFramework.ts index b8497f7e7..1a99ea29e 100644 --- a/app/src/mobile/util/initFramework.ts +++ b/app/src/mobile/util/initFramework.ts @@ -174,7 +174,7 @@ export const initFramework = (app: App, isStart: boolean) => { const idZoomIn = getIdZoomInByPath(); if (idZoomIn.id) { openMobileFileById(app, idZoomIn.id, - idZoomIn.isZoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]); + idZoomIn.isZoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]); return; } if (window.siyuan.config.fileTree.closeTabsOnStart && isStart) { diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 61cf1af47..91f4c407b 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -2142,7 +2142,7 @@ export class WYSIWYG { action.push(Constants.CB_GET_HL); } /// #if MOBILE - openMobileFileById(protyle.app, refBlockId, zoomIn ? [Constants.CB_GET_ALL] : [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]); activeBlur(); hideKeyboardToolbar(); /// #else @@ -2208,7 +2208,7 @@ export class WYSIWYG { excludeIDs: [blockElement.getAttribute("data-node-id")] }, (response) => { checkFold(response.data[0], (zoomIn) => { - openMobileFileById(protyle.app, response.data[0], zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]); + openMobileFileById(protyle.app, response.data[0], zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]); activeBlur(); hideKeyboardToolbar(); }); @@ -2282,7 +2282,7 @@ export class WYSIWYG { const embedId = embedItemElement.getAttribute("data-id"); checkFold(embedId, (zoomIn, action) => { /// #if MOBILE - openMobileFileById(protyle.app, embedId, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]); + openMobileFileById(protyle.app, embedId, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]); activeBlur(); hideKeyboardToolbar(); /// #else