Skip to content

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

:bug: Respect model back callbacks for mobile swipe gestures https://github.com/siyuan-note/siyuan/issues/14648

Daniel3f8a5f0e8419
diff --git a/app/src/mobile/util/touch.ts b/app/src/mobile/util/touch.ts
index 350e6e07ef..0a174ffc60 100644
--- a/app/src/mobile/util/touch.ts
+++ b/app/src/mobile/util/touch.ts
@@ -13,6 +13,7 @@ import {getRangeByPoint} from "../../protyle/util/selection";
import {getCurrentEditor} from "../editor";
import {Constants} from "../../constants";
import {getEmbedChildOperationContext} from "../../protyle/wysiwyg/getBlock";
+import {backModel} from "../menu/model";
let clientX: number;
let clientY: number;
@@ -142,7 +143,9 @@ export const handleTouchEnd = (event: TouchEvent) => {
!hasClosestByClassName(target, "protyle-wysiwyg", true) &&
// 划选文字时不触发关闭面板
(getSelection().rangeCount === 0 || getSelection().toString() === "")) {
- closeModel();
+ if (!backModel()) {
+ closeModel();
+ }
}
return;
}