diff --git a/app/src/protyle/wysiwyg/remove.ts b/app/src/protyle/wysiwyg/remove.ts index a2de68284..d47224da9 100644 --- a/app/src/protyle/wysiwyg/remove.ts +++ b/app/src/protyle/wysiwyg/remove.ts @@ -108,10 +108,8 @@ export const removeBlock = async (protyle: IProtyle, blockElement: Element, rang } let previousID = topElement.previousElementSibling ? topElement.previousElementSibling.getAttribute("data-node-id") : ""; if (topElement.previousElementSibling && - topElement.previousElementSibling.getAttribute("data-type") === "NodeHeading" && topElement.previousElementSibling.getAttribute("fold") === "1" && - (topElement.nextElementSibling?.getAttribute("data-type") !== "NodeHeading" || - (topElement.nextElementSibling?.getAttribute("data-type") === "NodeHeading" && topElement.nextElementSibling?.getAttribute("data-subtype") < topElement.getAttribute("data-subtype")) - )) { + topElement.previousElementSibling.getAttribute("data-type") === "NodeHeading" && + topElement.previousElementSibling.getAttribute("fold") === "1") { const foldId = topElement.previousElementSibling.getAttribute("data-node-id"); if (!unfoldData[foldId]) { const foldTransaction = await fetchSyncPost("/api/block/getHeadingDeleteTransaction", {