From 17a96ee1b1b51817b83e51bacac76a5f69d6688b Mon Sep 17 00:00:00 2001 From: Jeffrey Chen <78434827+TCOTC@users.noreply.github.com> Date: Fri, 5 Sep 2025 12:10:44 +0800 Subject: [PATCH] :art: Dragging multiple files into the editor will cause them to be opened by the default program (#15773) --- app/src/protyle/util/editorCommonEvent.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts index 495be24ee..e473cca2d 100644 --- a/app/src/protyle/util/editorCommonEvent.ts +++ b/app/src/protyle/util/editorCommonEvent.ts @@ -1418,6 +1418,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => { targetElement.classList.remove("dragover__bottom", "dragover__top", "dragover__left", "dragover__right"); } } else if (!window.siyuan.dragElement && (event.dataTransfer.types[0] === "Files" || event.dataTransfer.types.includes("text/html"))) { + event.preventDefault(); // 外部文件拖入编辑器中或者编辑器内选中文字拖拽 // https://github.com/siyuan-note/siyuan/issues/9544 const avElement = hasClosestByClassName(event.target, "av");