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

Vanessa2764854ff2f9
diff --git a/app/src/mobile/dock/MobileOutline.ts b/app/src/mobile/dock/MobileOutline.ts
index e3a6c52702..8d305a763f 100644
--- a/app/src/mobile/dock/MobileOutline.ts
+++ b/app/src/mobile/dock/MobileOutline.ts
@@ -6,6 +6,7 @@ import {getEventName} from "../../protyle/util/compatibility";
import {App} from "../../index";
import {closePanel} from "../util/closePanel";
import {checkFold} from "../../util/noRelyPCFunction";
+import {hasClosestBlock} from "../../protyle/util/hasClosest";
export class MobileOutline {
private tree: Tree;
@@ -83,6 +84,16 @@ export class MobileOutline {
this.openNodes[blockId] = this.tree.getExpandIds();
}
+ if (window.siyuan.mobile.editor?.protyle?.toolbar.range) {
+ const blockElement = hasClosestBlock(window.siyuan.mobile.editor.protyle.toolbar.range.startContainer);
+ if (blockElement) {
+ const currentElement = this.element.querySelector(`[data-node-id="${blockElement.dataset.nodeId}"]`);
+ if (currentElement) {
+ currentElement.classList.add("b3-list-item--focus");
+ return;
+ }
+ }
+ }
if (currentId) {
currentElement = this.element.querySelector(`[data-node-id="${currentId}"]`);
if (currentElement) {