mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
This commit is contained in:
parent
330da59c6f
commit
3feea1c7a7
1 changed files with 2 additions and 1 deletions
|
@ -914,7 +914,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||||
currentNode.textContent === "") // https://ld246.com/article/1649251218696
|
currentNode.textContent === "") // https://ld246.com/article/1649251218696
|
||||||
)) {
|
)) {
|
||||||
if (!nodeElement.classList.contains("code-block") ||
|
if (!nodeElement.classList.contains("code-block") ||
|
||||||
(nodeElement.classList.contains("code-block") && editElement.textContent == "\n")
|
(nodeElement.classList.contains("code-block") &&
|
||||||
|
(editElement.textContent == "\n" || nodeElement.parentElement.classList.contains("li")))
|
||||||
) {
|
) {
|
||||||
removeBlock(protyle, nodeElement, range, "Backspace");
|
removeBlock(protyle, nodeElement, range, "Backspace");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue