mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
This commit is contained in:
parent
1f69a87cc5
commit
8ea8db64ec
1 changed files with 2 additions and 2 deletions
|
|
@ -177,11 +177,11 @@ const moveTo = async (protyle: IProtyle, sourceElements: Element[], targetElemen
|
||||||
if (position === "afterend" &&
|
if (position === "afterend" &&
|
||||||
targetElement.getAttribute("data-type") === "NodeHeading" &&
|
targetElement.getAttribute("data-type") === "NodeHeading" &&
|
||||||
targetElement.getAttribute("fold") === "1") {
|
targetElement.getAttribute("fold") === "1") {
|
||||||
ignoreInsert = targetElement.getAttribute("data-subtype").replace("h", "");
|
ignoreInsert = targetElement.getAttribute("data-subtype")?.replace("h", "");
|
||||||
} else if (position === "beforebegin" && targetElement.previousElementSibling &&
|
} else if (position === "beforebegin" && targetElement.previousElementSibling &&
|
||||||
targetElement.previousElementSibling.getAttribute("data-type") === "NodeHeading" &&
|
targetElement.previousElementSibling.getAttribute("data-type") === "NodeHeading" &&
|
||||||
targetElement.previousElementSibling.getAttribute("fold") === "1") {
|
targetElement.previousElementSibling.getAttribute("fold") === "1") {
|
||||||
ignoreInsert = targetElement.getAttribute("data-subtype").replace("h", "");
|
ignoreInsert = targetElement.getAttribute("data-subtype")?.replace("h", "");
|
||||||
}
|
}
|
||||||
if (ignoreInsert) {
|
if (ignoreInsert) {
|
||||||
let breakIgnore = false;
|
let breakIgnore = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue