Skip to content

Commit 69eeeb7

Browse files
committed
Fix position check in selectEnd function of focusHelpers.ts
1 parent 09c7f89 commit 69eeeb7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

web/src/lib/helpers/focusHelpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ const selectEnd = (element: HTMLElement, position: number) => {
151151
range.setStart(textNodes.slice(-1)[0], Math.min(position, element.textContent?.length || 0));
152152
} else {
153153
textNodes.forEach((node) => {
154-
if (position <= 0) return;
154+
if (position < 0) return;
155155

156156
const length = node.nodeName === '#text'
157157
? node.textContent?.length || 0

0 commit comments

Comments
 (0)