Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Outline drag function is abnormal https://github.com/siyuan-note/siyuan/issues/15909

Daniel1ce7f2c9b68d
diff --git a/kernel/model/outline.go b/kernel/model/outline.go
index 4e819d5111..d5f67f646b 100644
--- a/kernel/model/outline.go
+++ b/kernel/model/outline.go
@@ -90,9 +90,9 @@ func (tx *Transaction) doMoveOutlineHeading(operation *Operation) (ret *TxErr) {
}
for _, h := range headingChildren {
- if h.ID == targetNode.ID {
- // 目标节点是当前标题的子节点,不需要移动
- return
+ if h.ID == targetNode.ID { // 目标节点是当前标题的子节点
+ // 尝试重新计算目标节点:使用当前标题的前一个节点
+ targetNode = heading.Previous
}
}