We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a8a989 commit 5317798Copy full SHA for 5317798
packages/astro/src/transitions/router.ts
@@ -305,8 +305,8 @@ async function updateDOM(
305
activeElement instanceof HTMLInputElement ||
306
activeElement instanceof HTMLTextAreaElement
307
) {
308
- start && (activeElement.selectionStart = start);
309
- end && (activeElement.selectionEnd = end);
+ if (typeof start === 'number') activeElement.selectionStart = start;
+ if (typeof end === 'number') activeElement.selectionEnd = end;
310
}
311
312
};
0 commit comments