Skip to content

Conversation

@nadalaba
Copy link
Contributor

@nadalaba nadalaba commented Sep 6, 2024

Description

  • When getting to a long multi-line word, the caret jumps to the last line of that word instead of the line of the first letter.
    long-word-caret

@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Sep 6, 2024
This check was needed when `letterPosTop` was
`currentLetter?.offsetTop ?? previousLetter?.offsetTop ??
lastWordLetter?.offsetTop` where `previousLetter?.offsetTop` was defined
but 0 in extra letters in blind mode, so we got the value of zero
although in some fonts the real value (`lastWordLetter` value) is not 0.

However, now we don't use `previousLetter`, and `currentLetter` is
undefined in extra letters (blind mode or not), so we'll get the value
we want (`lastWordLetter` value) in extra letters.
Copy link
Member

@Miodec Miodec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@Miodec Miodec merged commit cbaefbf into monkeytypegame:master Sep 6, 2024
@nadalaba nadalaba deleted the long-word-caret branch September 6, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants