mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
This commit is contained in:
parent
1ce39eb85c
commit
be7ac73904
1 changed files with 6 additions and 0 deletions
|
@ -964,6 +964,12 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// https://github.com/siyuan-note/siyuan/issues/15424
|
||||||
|
if (position.start === 1 && rangeNextElement && rangeNextElement.nodeType === 1 &&
|
||||||
|
rangeNextElement.dataset.type === "code") {
|
||||||
|
range.insertNode(document.createTextNode(Constants.ZWSP));
|
||||||
|
range.collapse(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 代码块中空行 ⌘+Del 异常 https://ld246.com/article/1663166544901
|
// 代码块中空行 ⌘+Del 异常 https://ld246.com/article/1663166544901
|
||||||
if (nodeElement.classList.contains("code-block") && isOnlyMeta(event) &&
|
if (nodeElement.classList.contains("code-block") && isOnlyMeta(event) &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue