Skip to content

Commit cf74cd7

Browse files
committed
fix: hide extra letters causing caret to go to the start of the active word
1 parent 2af5879 commit cf74cd7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

frontend/src/ts/test/caret.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ function getTargetPositionLeft(
5555
fullWidthOffset;
5656
}
5757
} else {
58-
if (Config.blindMode && inputLenLongerThanWordLen) {
58+
if (
59+
(Config.blindMode || Config.hideExtraLetters) &&
60+
inputLenLongerThanWordLen
61+
) {
5962
result = lastWordLetter.offsetLeft + lastWordLetter.offsetWidth;
6063
} else if (currentLetter !== undefined) {
6164
result = currentLetter.offsetLeft;

0 commit comments

Comments
 (0)