Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/11275

Vanessa0018632ee4ef
diff --git a/app/src/dialog/message.ts b/app/src/dialog/message.ts
index 069773ddbb..5d29ba3ae3 100644
--- a/app/src/dialog/message.ts
+++ b/app/src/dialog/message.ts
@@ -22,7 +22,9 @@ export const initMessage = () => {
} else if (target.tagName === "A" || target.tagName === "BUTTON") {
break;
} else if (target.classList.contains("b3-snackbar")) {
- hideMessage(target.getAttribute("data-id"));
+ if (getSelection().rangeCount === 0 || !getSelection().getRangeAt(0).toString()) {
+ hideMessage(target.getAttribute("data-id"));
+ }
event.preventDefault();
event.stopPropagation();
break;