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/7852

Vanessa541480c9c407
diff --git a/app/src/menus/Menu.ts b/app/src/menus/Menu.ts
index 43ac6fafc2..50f9c9cc14 100644
--- a/app/src/menus/Menu.ts
+++ b/app/src/menus/Menu.ts
@@ -126,12 +126,13 @@ export class Menu {
<svg class="b3-menu__icon"><use xlink:href="#iconLeft"></use></svg>
<span class="b3-menu__label">${window.siyuan.languages.back}</span>
</div><button class="b3-menu__separator"></button>`);
- if (position === "bottom" ) {
- this.element.querySelectorAll(".b3-menu__submenu").forEach((item:HTMLElement) => {
+ if (position === "bottom") {
+ this.element.querySelectorAll(".b3-menu__submenu").forEach((item: HTMLElement) => {
item.style.top = "calc(50vh + 48.5px)";
});
}
this.popup({x: 0, y: position === "bottom" ? window.innerHeight / 2 : 0});
+ this.element.scrollTop = 0;
}
}
diff --git a/app/src/mobile/util/closePanel.ts b/app/src/mobile/util/closePanel.ts
index 1127dae10f..4848d234e1 100644
--- a/app/src/mobile/util/closePanel.ts
+++ b/app/src/mobile/util/closePanel.ts
@@ -5,4 +5,5 @@ export const closePanel = () => {
const maskElement = document.querySelector(".side-mask") as HTMLElement;
maskElement.classList.add("fn__none");
maskElement.style.opacity = "";
+ window.siyuan.menus.menu.remove();
};
diff --git a/app/src/mobile/util/touch.ts b/app/src/mobile/util/touch.ts
index 081b1772dd..b6afc577e4 100644
--- a/app/src/mobile/util/touch.ts
+++ b/app/src/mobile/util/touch.ts
@@ -33,6 +33,7 @@ export const handleTouchEnd = (event: TouchEvent) => {
if (!clientX || !clientY || typeof yDiff === "undefined" ||
hasClosestByClassName(target, "b3-dialog") ||
hasClosestByClassName(target, "keyboard") ||
+ hasClosestByAttribute(target, "id", "commonMenu") ||
hasClosestByAttribute(target, "id", "model")
) {
return;
@@ -146,6 +147,7 @@ export const handleTouchMove = (event: TouchEvent) => {
if (!clientX || !clientY ||
hasClosestByClassName(target, "b3-dialog") ||
hasClosestByClassName(target, "keyboard") ||
+ hasClosestByAttribute(target, "id", "commonMenu") ||
hasClosestByAttribute(target, "id", "model")) {
return;
}
@@ -217,5 +219,5 @@ export const handleTouchMove = (event: TouchEvent) => {
const transformMask = (opacity: number) => {
const maskElement = document.querySelector(".side-mask") as HTMLElement;
maskElement.classList.remove("fn__none");
- maskElement.style.opacity = Math.min((1 - opacity), 0.86).toString();
+ maskElement.style.opacity = Math.min((1 - opacity), 0.68).toString();
};