From 640abbf87f85edbac910e602bbf9979274433b1e Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 14 Apr 2024 11:11:18 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/11028 --- app/src/protyle/gutter/index.ts | 7 ++++++- app/src/protyle/wysiwyg/transaction.ts | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts index fc2efd0f2..84f368bdf 100644 --- a/app/src/protyle/gutter/index.ts +++ b/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(); } diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index 0e7d443c4..7994fc931 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -191,6 +191,7 @@ const promiseTransaction = () => { blockRender(protyle, item); } }); + hideElements(["gutter"], protyle); return; } if (operation.action === "move") {