This commit is contained in:
parent
dcee38bcfa
commit
a330774822
1 changed files with 6 additions and 0 deletions
|
@ -759,6 +759,12 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
event.preventDefault();
|
||||
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…
Add table
Reference in a new issue