mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-03 11:20:16 +01:00
This commit is contained in:
parent
0e0a64caa5
commit
14441cc52a
2 changed files with 11 additions and 2 deletions
|
|
@ -55,7 +55,7 @@ export const removeBlock = async (protyle: IProtyle, blockElement: Element, rang
|
|||
const unfoldData: {
|
||||
[key: string]: {
|
||||
element: Element,
|
||||
previousID: string
|
||||
previousID?: string
|
||||
}
|
||||
} = {};
|
||||
for (let i = 0; i < selectElements.length; i++) {
|
||||
|
|
@ -149,6 +149,13 @@ export const removeBlock = async (protyle: IProtyle, blockElement: Element, rang
|
|||
} else {
|
||||
listElement = undefined;
|
||||
}
|
||||
// https://github.com/siyuan-note/siyuan/issues/12327
|
||||
if (topElement.parentElement.classList.contains("li") && topElement.parentElement.childElementCount === 4 &&
|
||||
topElement.parentElement.getAttribute("fold") === "1") {
|
||||
unfoldData[topElement.parentElement.getAttribute("data-node-id")] = {
|
||||
element: topElement.parentElement,
|
||||
};
|
||||
}
|
||||
topElement.remove();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue