mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-09 18:28:50 +01:00
This commit is contained in:
parent
fd37c83cfd
commit
02bbd6bffd
1 changed files with 2 additions and 4 deletions
|
|
@ -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", {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue