mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
🐛 focus
This commit is contained in:
parent
deab11f9d0
commit
2d127178a5
1 changed files with 1 additions and 1 deletions
|
|
@ -311,7 +311,7 @@ export const setFirstNodeRange = (editElement: Element, range: Range) => {
|
|||
range.selectNodeContents(editElement);
|
||||
return range;
|
||||
}
|
||||
if (firstChild.classList.contains("render-node")) {
|
||||
if (firstChild.nodeType !== 3 && firstChild.classList.contains("render-node")) {
|
||||
range.setStartBefore(firstChild);
|
||||
} else {
|
||||
range.setStart(firstChild, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue