An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: https://github.com/siyuan-note/siyuan/issues/13181
Vanessa5228511bd3bf
diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.tsindex 1e5dc14944..c23bb4d7c3 100644--- a/app/src/protyle/util/editorCommonEvent.ts+++ b/app/src/protyle/util/editorCommonEvent.ts@@ -1070,7 +1070,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {} else if (event.dataTransfer.getData(Constants.SIYUAN_DROP_FILE)?.split("-").length > 1) {// 文件树拖拽const ids = event.dataTransfer.getData(Constants.SIYUAN_DROP_FILE).split(",");- if (event.altKey) {+ if (!event.altKey) {if (event.y > protyle.wysiwyg.element.lastElementChild.getBoundingClientRect().bottom) {insertEmptyBlock(protyle, "afterend", protyle.wysiwyg.element.lastElementChild.getAttribute("data-node-id"));} else {@@ -1230,7 +1230,9 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {event.preventDefault();return;}- if (event.shiftKey || event.altKey) {+ const fileTreeIds = (event.dataTransfer.types.includes(Constants.SIYUAN_DROP_FILE) && window.siyuan.dragElement) ? window.siyuan.dragElement.innerText : "";+ if (event.shiftKey || (event.altKey && fileTreeIds.indexOf("-") === -1) ||+ (!event.altKey && fileTreeIds.indexOf("-") > -1)) {const targetElement = hasClosestBlock(event.target);if (targetElement) {targetElement.classList.remove("dragover__top", "protyle-wysiwyg--select", "dragover__bottom", "dragover__left", "dragover__right");@@ -1315,7 +1317,6 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {if (!targetElement) {return;}- const fileTreeIds = (event.dataTransfer.types.includes(Constants.SIYUAN_DROP_FILE) && window.siyuan.dragElement) ? window.siyuan.dragElement.innerText : "";if (targetElement && dragoverElement && targetElement.isSameNode(dragoverElement)) {// 性能优化,目标为同一个元素不再进行校验const nodeRect = targetElement.getBoundingClientRect();