From 20e8b81b8fbe989d98bbefe5d05fe8f8d075fa38 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 22 Oct 2024 11:35:52 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/12857 --- app/src/protyle/util/editorCommonEvent.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts index 6605877f2..6d2689e8c 100644 --- a/app/src/protyle/util/editorCommonEvent.ts +++ b/app/src/protyle/util/editorCommonEvent.ts @@ -1208,9 +1208,8 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => { }); } // 设置了的话 drop 就无法监听 shift/control event.dataTransfer.dropEffect = "move"; - if (event.dataTransfer.types.includes("Files") && event.target.classList.contains("protyle-wysiwyg")) { - // 文档底部拖拽文件需 preventDefault,否则无法触发 drop 事件 https://github.com/siyuan-note/siyuan/issues/2665 - event.preventDefault(); + if (event.dataTransfer.types.includes("Files")) { + // 使用 event.preventDefault(); 会导致无光标 https://github.com/siyuan-note/siyuan/issues/12857 return; } let gutterType = "";