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

Vanessa640abbf87f85
diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts
index fc2efd0f2a..84f368bdfd 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 0e7d443c42..7994fc931c 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") {