From 0018632ee4efc6a5626a7b647c56a30930f749d8 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 9 May 2024 16:55:36 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/11275 --- app/src/dialog/message.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/dialog/message.ts b/app/src/dialog/message.ts index 069773ddb..5d29ba3ae 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;