|
@@ -310,6 +310,14 @@ func (tx *Transaction) doMove(operation *Operation) (ret *TxErr) {
|
|
targetNode = targetChildren[l-1]
|
|
targetNode = targetChildren[l-1]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ for _, headingChild := range headingChildren {
|
|
|
|
+ if headingChild.ID == targetNode.ID {
|
|
|
|
+ // 不能将折叠标题移动到自己下方节点的前或后 https://github.com/siyuan-note/siyuan/issues/7163
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
for i := len(headingChildren) - 1; -1 < i; i-- {
|
|
for i := len(headingChildren) - 1; -1 < i; i-- {
|
|
c := headingChildren[i]
|
|
c := headingChildren[i]
|
|
targetNode.InsertAfter(c)
|
|
targetNode.InsertAfter(c)
|
|
@@ -352,6 +360,13 @@ func (tx *Transaction) doMove(operation *Operation) (ret *TxErr) {
|
|
return &TxErr{code: TxErrCodeBlockNotFound, id: targetParentID}
|
|
return &TxErr{code: TxErrCodeBlockNotFound, id: targetParentID}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ for _, headingChild := range headingChildren {
|
|
|
|
+ if headingChild.ID == targetNode.ID {
|
|
|
|
+ // 不能将折叠标题移动到自己下方节点的前或后 https://github.com/siyuan-note/siyuan/issues/7163
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
processed := false
|
|
processed := false
|
|
if ast.NodeSuperBlock == targetNode.Type {
|
|
if ast.NodeSuperBlock == targetNode.Type {
|
|
// 在布局节点后插入
|
|
// 在布局节点后插入
|