Skip to content

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

:art: 右键弹出文档树菜单时关闭浮窗

Vanessae5ebab88940b
diff --git a/app/src/block/popover.ts b/app/src/block/popover.ts
index ec97c8ade7..663dd1e767 100644
--- a/app/src/block/popover.ts
+++ b/app/src/block/popover.ts
@@ -211,7 +211,7 @@ const hidePopover = (event: MouseEvent & { path: HTMLElement[] }) => {
} else {
// 浮窗上点击菜单,浮窗不能消失 https://ld246.com/article/1632668091023
const menuElement = hasClosestByClassName(target, "b3-menu");
- if (menuElement) {
+ if (menuElement && menuElement.getAttribute("data-name") !== "docTreeMore") {
const blockPanel = window.siyuan.blockPanels.find((item) => {
if (item.element.style.zIndex < menuElement.style.zIndex) {
return true;
diff --git a/app/src/menus/navigation.ts b/app/src/menus/navigation.ts
index 05149c5b09..6a0509c027 100644
--- a/app/src/menus/navigation.ts
+++ b/app/src/menus/navigation.ts
@@ -705,6 +705,7 @@ export const initFileMenu = (app: App, notebookId: string, pathString: string, l
separatorPosition: "top",
});
}
+ window.siyuan.menus.menu.element.setAttribute("data-name", "docTreeMore");
return window.siyuan.menus.menu;
};