monkeytypegame / monkeytype

The most customizable typing website with a minimalistic design and a ton of features. Test yourself in various modes, track your progress and improve your speed.
https://monkeytype.com/
GNU General Public License v3.0
15.68k stars 2.39k forks source link

Swipe typing doesn't highlight completed words well #5624

Open asasine opened 3 months ago

asasine commented 3 months ago

Did you clear cache before opening an issue?

Is there an existing issue for this?

Does the issue happen when logged in?

Yes

Does the issue happen when logged out?

Yes

Does the issue happen in incognito mode when logged in?

Yes

Does the issue happen in incognito mode when logged out?

Yes

Account name

No response

Account config

No response

Current Behavior

When swipe typing, words are accepted with correct accuracy, and the cursor advances to the next word, but after the first word, the previous word is duplicated as both complete (colored dark) and incomplete (colored light), with the cursor between the two. This video should clarify.

https://github.com/user-attachments/assets/a9591a0a-f1c6-4d15-949c-c43b413e4fdb

Additionally, if the doubled word happens to end the current line, the doubled word takes up the "slot" where the next word should be. You can see this occur around 26s into the video with the word increase. There's no way to know what the next word is.

Expected Behavior

The duplicate word shouldn't appear. The next word should remain visible when at the end of the final line.

Steps To Reproduce

  1. Ensure swipe typing is enabled on iOS (General > Keyboard > Slide to Type)
  2. Go to monkeytype.com in Safari
  3. Swipe type a test

Environment

Anything else?

No response

Reyan9450 commented 3 months ago

I think this is happening because the monkey type is not configured to handle swipe typing, and I tried to look in the codebase but could not find the file that handles keyboard events if anyone knows which file handles the keyboard events please let me know.

Miodec commented 3 months ago

Swipe typing will work but some changes have been made in the way input is displayed.

@Reyan9450 input-controller.ts:1373 should be the place where swipe is handled.