소스 검색

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

Vanessa 1 년 전
부모
커밋
640abbf87f
2개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      app/src/protyle/gutter/index.ts
  2. 1 0
      app/src/protyle/wysiwyg/transaction.ts

+ 6 - 1
app/src/protyle/gutter/index.ts

@@ -49,6 +49,7 @@ import {insertAttrViewBlockAnimation} from "../render/av/row";
 import {avContextmenu} from "../render/av/action";
 import {openSearchAV} from "../render/av/relation";
 import {getPlainText} from "../util/paste";
+import {Menu} from "../../plugin/Menu";
 
 export class Gutter {
     public element: HTMLElement;
@@ -64,6 +65,7 @@ export class Gutter {
         this.element.className = "protyle-gutters";
         this.element.addEventListener("dragstart", (event: DragEvent & { target: HTMLElement }) => {
             hideTooltip();
+            window.siyuan.menus.menu.remove();
             const buttonElement = event.target.parentElement;
             let selectIds: string[] = [];
             let selectElements: Element[] = [];
@@ -925,7 +927,10 @@ export class Gutter {
             return;
         }
         hideElements(["util", "toolbar", "hint"], protyle);
-        window.siyuan.menus.menu.remove();
+        const menu = new Menu("gutter");
+        if (menu.isOpen) {
+            return;
+        }
         if (isMobile()) {
             activeBlur();
         }

+ 1 - 0
app/src/protyle/wysiwyg/transaction.ts

@@ -191,6 +191,7 @@ const promiseTransaction = () => {
                         blockRender(protyle, item);
                     }
                 });
+                hideElements(["gutter"], protyle);
                 return;
             }
             if (operation.action === "move") {