This commit is contained in:
parent
e474ceffe1
commit
3562cc0bb1
1 changed files with 2 additions and 2 deletions
|
@ -317,9 +317,9 @@ export const setLastNodeRange = (editElement: Element, range: Range, setStart =
|
|||
// 最后一个为多种行内元素嵌套
|
||||
lastNode = lastNode.lastChild as Element;
|
||||
}
|
||||
// https://github.com/siyuan-note/siyuan/issues/12753
|
||||
if (!lastNode) {
|
||||
range.selectNodeContents(editElement);
|
||||
return range;
|
||||
lastNode = editElement;
|
||||
}
|
||||
if (setStart) {
|
||||
range.setStart(lastNode, lastNode.textContent.length);
|
||||
|
|
Loading…
Add table
Reference in a new issue