Skip to content

Commit 1cf4b07

Browse files
committed
fix(pace caret): stopping at the end of the word in blind mode
1 parent da01d29 commit 1cf4b07

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

frontend/src/ts/utils/caret.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,10 @@ export class Caret {
300300
// we also clamp the letterIndex to be within the range of actual letters
301301
// anything beyond just goes to the edge of the word
302302
let side: "beforeLetter" | "afterLetter" = "beforeLetter";
303-
if (options.letterIndex >= letters.length) {
303+
if (
304+
options.letterIndex >= letters.length ||
305+
(Config.blindMode && options.letterIndex >= wordText.length)
306+
) {
304307
side = "afterLetter";
305308
options.letterIndex = letters.length - 1;
306309
}

0 commit comments

Comments
 (0)