mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 07:30:12 +01:00
This commit is contained in:
parent
370df7866c
commit
ecff1bc3b7
1 changed files with 7 additions and 2 deletions
|
|
@ -412,8 +412,13 @@ export const focusBlock = (element: Element, parentElement?: HTMLElement, toStar
|
||||||
} else if (type === "NodeBlockQueryEmbed" && element.lastElementChild.previousElementSibling) {
|
} else if (type === "NodeBlockQueryEmbed" && element.lastElementChild.previousElementSibling) {
|
||||||
range.selectNodeContents(element.lastElementChild.previousElementSibling);
|
range.selectNodeContents(element.lastElementChild.previousElementSibling);
|
||||||
setRange = true;
|
setRange = true;
|
||||||
} else if (["NodeMathBlock", "NodeHTMLBlock"].includes(type) && element.lastElementChild.previousElementSibling?.lastElementChild) {
|
} else if (["NodeMathBlock", "NodeHTMLBlock"].includes(type)) {
|
||||||
range.selectNodeContents(element.lastElementChild.previousElementSibling.lastElementChild);
|
// https://ld246.com/article/1655714737572
|
||||||
|
if (element.lastElementChild.previousElementSibling?.lastElementChild) {
|
||||||
|
range.selectNodeContents(element.lastElementChild.previousElementSibling.lastElementChild);
|
||||||
|
} else if (element.lastElementChild.previousElementSibling) {
|
||||||
|
range.selectNodeContents(element.lastElementChild.previousElementSibling);
|
||||||
|
}
|
||||||
setRange = true;
|
setRange = true;
|
||||||
} else if (type === "NodeIFrame" || type === "NodeWidget") {
|
} else if (type === "NodeIFrame" || type === "NodeWidget") {
|
||||||
range.setStart(element, 0);
|
range.setStart(element, 0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue