Skip to content

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

:art: fix https://github.com/siyuan-note/siyuan/issues/7655

Vanessaf3513e9408ad
diff --git a/app/src/mobile/util/MobileBackFoward.ts b/app/src/mobile/util/MobileBackFoward.ts
index 4950916f8f..9e43e933eb 100644
--- a/app/src/mobile/util/MobileBackFoward.ts
+++ b/app/src/mobile/util/MobileBackFoward.ts
@@ -8,6 +8,7 @@ import {highlightRender} from "../../protyle/markdown/highlightRender";
import {blockRender} from "../../protyle/markdown/blockRender";
import {disabledForeverProtyle, disabledProtyle, enableProtyle} from "../../protyle/util/onGet";
import {setStorageVal} from "../../protyle/util/compatibility";
+import {closePanel} from "./closePanel";
const forwardStack: IBackStack[] = [];
@@ -113,6 +114,9 @@ export const goBack = () => {
if (window.siyuan.menus.menu.element.classList.contains("b3-menu--fullscreen") && !window.siyuan.menus.menu.element.classList.contains("fn__none")) {
window.siyuan.menus.menu.element.dispatchEvent(new CustomEvent("click", {detail: "back"}));
return;
+ } else if (document.getElementById("model").style.top === "0px") {
+ closePanel();
+ return;
} else if (window.siyuan.backStack.length < 1) {
window.JSAndroid.returnDesktop();
return;
diff --git a/app/src/mobile/util/closePanel.ts b/app/src/mobile/util/closePanel.ts
index e6a5b7e2bb..4369038c34 100644
--- a/app/src/mobile/util/closePanel.ts
+++ b/app/src/mobile/util/closePanel.ts
@@ -1,10 +1,6 @@
export const closePanel = () => {
- const menuElement = document.getElementById("menu");
- const sidebarElement = document.getElementById("sidebar");
- const scrimElement = document.querySelector(".scrim");
- const modelElement = document.getElementById("model");
- menuElement.style.right = "-100vw";
- sidebarElement.style.left = "-100vw";
- modelElement.style.top = "-200vh";
- scrimElement.classList.add("fn__none");
+ document.getElementById("menu").style.right = "-100vw";
+ document.getElementById("sidebar").style.left = "-100vw";
+ document.getElementById("model").style.top = "-200vh";
+ document.querySelector(".scrim").classList.add("fn__none");
};