mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
This commit is contained in:
parent
95c0955735
commit
25dd919cf5
1 changed files with 3 additions and 2 deletions
|
|
@ -30,7 +30,8 @@ export const getLastBlock = (element: Element) => {
|
|||
export const getFirstBlock = (element: Element) => {
|
||||
let firstElement;
|
||||
Array.from(element.querySelectorAll("[data-node-id]")).find(item => {
|
||||
if (!hasClosestByAttribute(item.parentElement, "data-type", "NodeBlockQueryEmbed") && !item.classList.contains("li")) {
|
||||
if (!hasClosestByAttribute(item.parentElement, "data-type", "NodeBlockQueryEmbed") &&
|
||||
!item.classList.contains("li") && !item.classList.contains("sb")) {
|
||||
firstElement = item;
|
||||
return true;
|
||||
}
|
||||
|
|
@ -187,7 +188,7 @@ export const getNextFileLi = (current: Element) => {
|
|||
nextElement = nextElement.parentElement;
|
||||
} else if (nextElement.nextElementSibling.tagName === "LI") {
|
||||
return nextElement.nextElementSibling;
|
||||
} else if (nextElement.nextElementSibling.tagName === "UL") {
|
||||
} else if (nextElement.nextElementSibling.tagName === "UL") {
|
||||
return nextElement.nextElementSibling.firstElementChild;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue