This commit is contained in:
Vanessa 2023-03-14 23:26:18 +08:00
parent 3f5dc6432f
commit f3513e9408
2 changed files with 8 additions and 8 deletions

View file

@ -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;

View file

@ -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");
};