Skip to content

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

:recycle: 移动端面包屑消失

Vanessa2b9d5f076323
diff --git a/app/src/mobile/index.ts b/app/src/mobile/index.ts
index 9ada593a0c..96a14784d7 100644
--- a/app/src/mobile/index.ts
+++ b/app/src/mobile/index.ts
@@ -65,12 +65,8 @@ class App {
if (navigator.userAgent.indexOf("iPhone") > -1) {
document.addEventListener("touchstart", handleTouchStart, false);
document.addEventListener("touchmove", handleTouchMove, false);
- document.addEventListener("touchend", handleTouchEnd, false);
- } else {
- document.addEventListener("touchend", () => {
- window.siyuan.mobileEditor?.protyle.breadcrumb.show();
- }, false);
}
+ document.addEventListener("touchend", handleTouchEnd, false);
});
setNoteBook();
promiseTransactions();
diff --git a/app/src/mobile/util/touch.ts b/app/src/mobile/util/touch.ts
index e3733e8fbf..6c0fcd487f 100644
--- a/app/src/mobile/util/touch.ts
+++ b/app/src/mobile/util/touch.ts
@@ -9,8 +9,13 @@ const forwardStack: IBackStack[] = [];
let previousIsBack = false;
export const handleTouchEnd = () => {
- window.siyuan.mobileEditor?.protyle.breadcrumb.show();
- if (!clientX || !clientY) return;
+ if (window.siyuan.mobileEditor) {
+ window.siyuan.mobileEditor.protyle.breadcrumb.show();
+ }
+
+ if (!clientX || !clientY || navigator.userAgent.indexOf("iPhone") === -1) {
+ return;
+ }
if (Math.abs(xDiff) > Math.abs(yDiff) && Math.abs(xDiff) > window.innerWidth / 2) {
if (xDiff > 0) {