fix: support caret boundary on current target

This commit is contained in:
lucaronin
2026-04-14 11:37:44 +02:00
parent 70252b6324
commit cff9583a46

View File

@@ -84,7 +84,7 @@ function findTextBoundaryAtEdge(
}
const children = Array.from(node.childNodes)
const orderedChildren = edge === 'start' ? children : children.toReversed()
const orderedChildren = edge === 'start' ? children : [...children].reverse()
for (const child of orderedChildren) {
const boundary = findTextBoundaryAtEdge(child, edge)