mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-21 19:41:05 +08:00
This commit is contained in:
parent
dcee38bcfa
commit
a330774822
@ -759,6 +759,12 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 代码块中空行 ⌘+Del 异常 https://ld246.com/article/1663166544901
|
||||||
|
if (nodeElement.classList.contains("code-block") && range.startContainer.nodeType === 3 && range.startContainer.textContent.substring(range.startOffset - 1, range.startOffset) === "\n") {
|
||||||
|
event.stopPropagation();
|
||||||
|
event.preventDefault();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user