فهرست منبع

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

Vanessa 6 ماه پیش
والد
کامیت
e5ebab8894
2فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 1 1
      app/src/block/popover.ts
  2. 1 0
      app/src/menus/navigation.ts

+ 1 - 1
app/src/block/popover.ts

@@ -211,7 +211,7 @@ const hidePopover = (event: MouseEvent & { path: HTMLElement[] }) => {
     } else {
     } else {
         // 浮窗上点击菜单,浮窗不能消失 https://ld246.com/article/1632668091023
         // 浮窗上点击菜单,浮窗不能消失 https://ld246.com/article/1632668091023
         const menuElement = hasClosestByClassName(target, "b3-menu");
         const menuElement = hasClosestByClassName(target, "b3-menu");
-        if (menuElement) {
+        if (menuElement && menuElement.getAttribute("data-name") !== "docTreeMore") {
             const blockPanel = window.siyuan.blockPanels.find((item) => {
             const blockPanel = window.siyuan.blockPanels.find((item) => {
                 if (item.element.style.zIndex < menuElement.style.zIndex) {
                 if (item.element.style.zIndex < menuElement.style.zIndex) {
                     return true;
                     return true;

+ 1 - 0
app/src/menus/navigation.ts

@@ -705,6 +705,7 @@ export const initFileMenu = (app: App, notebookId: string, pathString: string, l
             separatorPosition: "top",
             separatorPosition: "top",
         });
         });
     }
     }
+    window.siyuan.menus.menu.element.setAttribute("data-name", "docTreeMore");
     return window.siyuan.menus.menu;
     return window.siyuan.menus.menu;
 };
 };