mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 08:48:49 +01:00
🐛 上下键报错
This commit is contained in:
parent
ac357adc73
commit
bbc67b32e2
1 changed files with 1 additions and 1 deletions
|
|
@ -554,7 +554,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
protyle.toolbar.isNewEmptyInline = false;
|
||||
protyle.hint.enableEmoji = false;
|
||||
// 需使用 editabled,否则代码块会把语言字数算入
|
||||
const nodeEditableElement = getContenteditableElement(nodeElement)
|
||||
const nodeEditableElement = getContenteditableElement(nodeElement) || nodeElement
|
||||
const position = getSelectionOffset(nodeEditableElement, protyle.wysiwyg.element, range);
|
||||
const tdElement = hasClosestByMatchTag(range.startContainer, "TD");
|
||||
if (event.key === "ArrowDown" && nodeEditableElement?.textContent.trimRight().substr(position.start).indexOf("\n") === -1 && (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue