mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-07 01:08:49 +01:00
This commit is contained in:
parent
0a7a7dcca7
commit
5abce8710b
1 changed files with 19 additions and 1 deletions
|
|
@ -9,7 +9,7 @@ import {
|
|||
hasNextSibling,
|
||||
hasPreviousSibling
|
||||
} from "./getBlock";
|
||||
import {transaction, turnsIntoTransaction, updateTransaction} from "./transaction";
|
||||
import {transaction, turnsIntoOneTransaction, turnsIntoTransaction, updateTransaction} from "./transaction";
|
||||
import {cancelSB, genEmptyElement} from "../../block/util";
|
||||
import {listOutdent, updateListOrder} from "./list";
|
||||
import {setFold, zoomOut} from "../../menus/protyle";
|
||||
|
|
@ -543,6 +543,24 @@ const removeLi = (protyle: IProtyle, blockElement: Element, range: Range, isDele
|
|||
id: listElement.getAttribute("data-node-id"),
|
||||
});
|
||||
transaction(protyle, doOperations, undoOperations);
|
||||
if (listElement.parentElement.classList.contains("sb") &&
|
||||
listElement.parentElement.getAttribute("data-sb-layout") === "col") {
|
||||
const selectsElement: Element[] = []
|
||||
let previousElement: Element = listElement;
|
||||
while (previousElement) {
|
||||
selectsElement.push(previousElement);
|
||||
if (undoOperations[0].id === previousElement.getAttribute("data-node-id")) {
|
||||
break;
|
||||
}
|
||||
previousElement = previousElement.previousElementSibling;
|
||||
}
|
||||
turnsIntoOneTransaction({
|
||||
protyle,
|
||||
selectsElement: selectsElement.reverse(),
|
||||
type: "BlocksMergeSuperBlock",
|
||||
level: "row"
|
||||
});
|
||||
}
|
||||
focusByWbr(protyle.wysiwyg.element, range);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue