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: Improve the drag-and-drop experience in the list and super block https://github.com/siyuan-note/siyuan/issues/17893
Danield3fa8bca8b5b
diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.tsindex 1283bd3172..24aa2111bd 100644--- a/app/src/protyle/util/editorCommonEvent.ts+++ b/app/src/protyle/util/editorCommonEvent.ts@@ -1632,13 +1632,13 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {return;}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)) {- // Alt=插入引用 / Shift=嵌入块:走光标定位语义,清除全部拖拽指示。+ if (event.altKey && fileTreeIds.indexOf("-") === -1) {+ // Alt=插入引用(行级):走光标定位语义,清除全部拖拽指示。// 复用 cleanupDragIndicators 以覆盖列表专属指示类(--sibling/--child)与 --drag-* 变量,- // 否则按 Alt/Shift 时列表指示线会冻结在原处不动(仅清通用类不足以移除列表指示)。+ // 否则按 Alt 时列表指示线会冻结在原处不动(仅清通用类不足以移除列表指示)。// 注意:保留源块 .protyle-wysiwyg--select 不移除——该类仅在 dragstart 添加一次,// 移除后永不恢复;松开修饰键回到普通拖拽时,no-op 守卫需靠它识别源块,- // 否则源项可被"移动"回自身原位。引用/嵌入语义不依赖该类(用 gutterTypes[2] 的 id)。+ // 否则源项可被"移动"回自身原位。引用语义不依赖该类(用 gutterTypes[2] 的 id)。cleanupDragIndicators(editorElement);editorElement.querySelectorAll("[select-start], [select-end]").forEach((item: HTMLElement) => {item.removeAttribute("select-start");