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
Daniele9b72641d8c5
diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.tsindex f8639873f0..8ff5d775a7 100644--- a/app/src/protyle/util/editorCommonEvent.ts+++ b/app/src/protyle/util/editorCommonEvent.ts@@ -1644,13 +1644,17 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {item.removeAttribute("select-start");item.removeAttribute("select-end");});- // 绘制行级竖线指示:定位到光标位置- const range = getRangeByPoint(event.clientX, event.clientY);- if (range && !hasClosestByAttribute(range.startContainer, "data-type", "NodeBlockQueryEmbed")) {- const rect = range.getBoundingClientRect();- if (rect.height > 0) {- showCaretLine(rect.left, rect.top, rect.height);+ // 绘制行级竖线指示:定位到光标位置(最后一个块下方是新建块,不显示竖线)+ if (event.y <= protyle.wysiwyg.element.lastElementChild.getBoundingClientRect().bottom) {+ const range = getRangeByPoint(event.clientX, event.clientY);+ if (range && !hasClosestByAttribute(range.startContainer, "data-type", "NodeBlockQueryEmbed")) {+ const rect = range.getBoundingClientRect();+ if (rect.height > 0) {+ showCaretLine(rect.left, rect.top, rect.height);+ }}+ } else {+ hideCaretLine();}event.preventDefault();return;