Skip to content

Commit

Permalink
🎨 #11360
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed May 12, 2024
1 parent 46282d2 commit 2764854
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/src/mobile/dock/MobileOutline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 2764854

Please sign in to comment.