瀏覽代碼

:bug: 数据库搜索复制粘贴无效

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

+ 3 - 3
app/src/protyle/wysiwyg/index.ts

@@ -240,7 +240,7 @@ export class WYSIWYG {
         this.element.addEventListener("copy", (event: ClipboardEvent & { target: HTMLElement }) => {
         this.element.addEventListener("copy", (event: ClipboardEvent & { target: HTMLElement }) => {
             window.siyuan.ctrlIsPressed = false; // https://github.com/siyuan-note/siyuan/issues/6373
             window.siyuan.ctrlIsPressed = false; // https://github.com/siyuan-note/siyuan/issues/6373
             // https://github.com/siyuan-note/siyuan/issues/4600
             // https://github.com/siyuan-note/siyuan/issues/4600
-            if (event.target.tagName === "PROTYLE-HTML") {
+            if (event.target.tagName === "PROTYLE-HTML" || event.target.localName === "input") {
                 event.stopPropagation();
                 event.stopPropagation();
                 return;
                 return;
             }
             }
@@ -1255,7 +1255,7 @@ export class WYSIWYG {
             if (protyle.disabled) {
             if (protyle.disabled) {
                 return;
                 return;
             }
             }
-            if (event.target.tagName === "PROTYLE-HTML") {
+            if (event.target.tagName === "PROTYLE-HTML" || event.target.localName === "input") {
                 event.stopPropagation();
                 event.stopPropagation();
                 return;
                 return;
             }
             }
@@ -1714,7 +1714,7 @@ export class WYSIWYG {
             }
             }
             window.siyuan.ctrlIsPressed = false; // https://github.com/siyuan-note/siyuan/issues/6373
             window.siyuan.ctrlIsPressed = false; // https://github.com/siyuan-note/siyuan/issues/6373
             // https://github.com/siyuan-note/siyuan/issues/4600
             // https://github.com/siyuan-note/siyuan/issues/4600
-            if (event.target.tagName === "PROTYLE-HTML") {
+            if (event.target.tagName === "PROTYLE-HTML" || event.target.localName === "input") {
                 event.stopPropagation();
                 event.stopPropagation();
                 return;
                 return;
             }
             }