mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 15:58:49 +01:00
This commit is contained in:
parent
bd59a69d51
commit
01d10929a7
1 changed files with 2 additions and 2 deletions
|
|
@ -176,7 +176,7 @@ export const getEditorRange = (element: Element): Range => {
|
|||
if (type === "NodeThematicBreak") {
|
||||
targetElement = element.firstElementChild;
|
||||
} else if (type === "NodeBlockQueryEmbed") {
|
||||
targetElement = element.lastElementChild.previousElementSibling?.firstChild;
|
||||
targetElement = element.querySelector(".protyle-cursor")?.firstChild;
|
||||
} else if (["NodeMathBlock", "NodeHTMLBlock"].includes(type)) {
|
||||
targetElement = element.lastElementChild.previousElementSibling?.lastElementChild?.firstChild;
|
||||
} else if (type === "NodeVideo") {
|
||||
|
|
@ -571,7 +571,7 @@ export const focusBlock = (element: Element, parentElement?: HTMLElement, toStar
|
|||
setRange = true;
|
||||
} else if (type === "NodeBlockQueryEmbed") {
|
||||
genRenderFrame(element);
|
||||
range.setStart(element.lastElementChild.previousElementSibling.firstChild, 0);
|
||||
range.setStart(element.querySelector(".protyle-cursor").firstChild, 0);
|
||||
range.collapse(true);
|
||||
setRange = true;
|
||||
} else if (type === "NodeMathBlock") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue