瀏覽代碼

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

Vanessa 1 年之前
父節點
當前提交
0018632ee4
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      app/src/dialog/message.ts

+ 3 - 1
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;