From c20c644440f6373a788621b7b4e1b0e0e2e7d8cd Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 13 May 2024 23:48:22 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/11372 --- app/src/mobile/dock/MobileOutline.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/mobile/dock/MobileOutline.ts b/app/src/mobile/dock/MobileOutline.ts index edb347be9..2b6be6705 100644 --- a/app/src/mobile/dock/MobileOutline.ts +++ b/app/src/mobile/dock/MobileOutline.ts @@ -59,11 +59,11 @@ export class MobileOutline { public update() { if (!window.siyuan.mobile.editor.protyle.preview.element.classList.contains("fn__none")) { + const blockId = window.siyuan.mobile.editor.protyle.preview.element.querySelector(".selected")?.id; window.siyuan.mobile.editor.protyle.preview.render(window.siyuan.mobile.editor.protyle, (outlineData) => { this.tree.updateData(outlineData); - const blockElement = window.siyuan.mobile.editor.protyle.preview.element.querySelector("selected") - if (blockElement) { - this.setCurrentByPreview(blockElement); + if (blockId) { + this.setCurrentByPreview(this.element.querySelector("#" + blockId)); return; } });