mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-16 13:45:29 +01:00
This commit is contained in:
parent
d6730613df
commit
cde0840bf7
1 changed files with 8 additions and 0 deletions
|
|
@ -511,6 +511,14 @@ export const removeBlock = async (protyle: IProtyle, blockElement: Element, rang
|
|||
// 图片前删除到上一个文字块时,图片前有 zwsp
|
||||
previousLastElement.outerHTML = protyle.lute.SpinBlockDOM(previousLastElement.outerHTML);
|
||||
mathRender(getPreviousBlock(removeElement) as HTMLElement);
|
||||
const removeParentElement = removeElement.parentElement;
|
||||
// https://github.com/siyuan-note/siyuan/issues/12327
|
||||
if (removeParentElement.classList.contains("li") && removeParentElement.childElementCount === 4 &&
|
||||
removeParentElement.getAttribute("fold") === "1") {
|
||||
const foldOperations = setFold(protyle, removeParentElement, true, false, false, true);
|
||||
doOperations.push(...foldOperations.doOperations);
|
||||
undoOperations.splice(0, 0, ...foldOperations.undoOperations);
|
||||
}
|
||||
removeElement.remove();
|
||||
// extractContents 内容过多时需要进行滚动条重置,否则位置会错位
|
||||
protyle.contentElement.scrollTop = scroll;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue