Skip to content

Commit

Permalink
🎨 #12857
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Oct 22, 2024
1 parent 1d0d065 commit 20e8b81
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/src/protyle/util/editorCommonEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
Expand Down

0 comments on commit 20e8b81

Please sign in to comment.