Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Keep mobile outline open after heading operations https://github.com/siyuan-note/siyuan/issues/18292

Daniel141fa97877e0
diff --git a/app/src/mobile/dock/MobileOutline.ts b/app/src/mobile/dock/MobileOutline.ts
index 0a34ea89e8..fe8822ee19 100644
--- a/app/src/mobile/dock/MobileOutline.ts
+++ b/app/src/mobile/dock/MobileOutline.ts
@@ -16,7 +16,6 @@ import {Model} from "../../layout/Model";
import {genUUID} from "../../util/genID";
import {getDocDisplayName, isEncryptedBox} from "../../util/pathName";
import {dragOverScroll, stopScrollAnimation} from "../../boot/globalEvent/dragover";
-import {closePanel} from "../util/closePanel";
import {escapeHtml} from "../../util/escape";
import {unicode2Emoji} from "../../emoji";
@@ -848,7 +847,6 @@ export class MobileOutline extends Model {
click: () => {
const data = this.getProtyleAndBlockElement(element);
if (data) {
- closePanel();
turnsIntoTransaction({
protyle: data.protyle,
selectsElement: [data.blockElement],
@@ -869,7 +867,6 @@ export class MobileOutline extends Model {
click: () => {
const data = this.getProtyleAndBlockElement(element);
if (data) {
- closePanel();
turnsIntoTransaction({
protyle: data.protyle,
selectsElement: [data.blockElement],
@@ -923,7 +920,6 @@ export class MobileOutline extends Model {
if (!data) {
return;
}
- closePanel();
const newId = Lute.NewNodeID();
const html = `<div data-subtype="h${currentLevel}" data-node-id="${newId}" data-type="NodeHeading" class="h${currentLevel}"><div contenteditable="true" spellcheck="false"><wbr></div><div class="protyle-attr" contenteditable="false">${Constants.ZWSP}</div></div>`;
const previousID = data.blockElement.previousElementSibling?.getAttribute("data-node-id");
@@ -954,7 +950,6 @@ export class MobileOutline extends Model {
return;
}
const rootID = data.protyle.block.rootID;
- closePanel();
focusBlock(data.blockElement);
fetchPost("/api/block/getHeadingDeleteTransaction", {
id,
@@ -998,7 +993,6 @@ export class MobileOutline extends Model {
return;
}
const rootID = data.protyle.block.rootID;
- closePanel();
focusBlock(data.blockElement);
fetchPost("/api/block/getHeadingDeleteTransaction", {
id,
@@ -1246,7 +1240,6 @@ export class MobileOutline extends Model {
return;
}
const rootID = protyle.block.rootID;
- closePanel();
getSelection()?.removeAllRanges();
fetchPost("/api/block/getHeadingLevelTransaction", {
id,