mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-28 12:28:48 +01:00
This commit is contained in:
parent
27ed451f12
commit
020dfabcb0
1 changed files with 2 additions and 2 deletions
|
|
@ -392,7 +392,7 @@ export const focusByOffset = (container: Element, start: number, end: number, is
|
|||
const editElement = getContenteditableElement(container);
|
||||
if (editElement) {
|
||||
container = editElement;
|
||||
} else if (isNotEditBlock(container) || container.classList.contains("av")) {
|
||||
} else if (isFocus && (isNotEditBlock(container) || container.classList.contains("av"))) {
|
||||
return focusBlock(container);
|
||||
}
|
||||
let startNode;
|
||||
|
|
@ -549,7 +549,7 @@ export const focusBlock = (element: Element, parentElement?: HTMLElement, toStar
|
|||
setRange = true;
|
||||
} else if (type === "NodeBlockQueryEmbed") {
|
||||
genRenderFrame(element);
|
||||
range.selectNodeContents(element.lastElementChild.previousElementSibling.firstChild);
|
||||
range.setStart(element.lastElementChild.previousElementSibling.firstChild, 0);
|
||||
range.collapse(true);
|
||||
setRange = true;
|
||||
} else if (["NodeMathBlock", "NodeHTMLBlock"].includes(type)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue