KeymashGame / game-tracker

Official Bugtracking Repository for all Keyma.sh issues
6 stars 0 forks source link

When a race is active, clicking anywhere on the screen should focus the input box #88

Closed popey456963 closed 3 years ago

popey456963 commented 3 years ago

Is your feature request related to a problem? Please describe. Often I tab out whilst waiting for load times to change what's playing on YouTube, move to the next song, etc. Sometimes, I don't tab back in time for the race. When this happens, I click back on the main text but that doesn't focus the input box. This seems unlike most other typing websites (NitroType, MonkeyType).

Describe the solution you'd like I can click other areas in the screen and it'll focus the input box (e.g. I often find myself clicking the typing prompt instead of the input box)

Describe alternatives you've considered None

Additional context None

CameronCT commented 3 years ago

Interesting issue.

CameronCT commented 3 years ago

I'm not able to re-create this issue, are you still having this issue?

CameronCT commented 3 years ago

Closing this issue as I still cannot replicate it and no response.

popey456963 commented 3 years ago

Still getting this issue. Video:

https://www.youtube.com/watch?v=0z0sLzFv8QI

CameronCT commented 3 years ago

After talking to @popey456963 personally, we figured out he was using Firefox. After doing some digging with firefox, this apparently is a common problem.

With Keyma.sh, we use similar code where the input box detects when it's not focused and will auto focus. Which is why I was unable to reproduce this on Google Chrome, however this is still a confirmed issue on Firefox.

https://bugzilla.mozilla.org/show_bug.cgi?id=53579 https://stackoverflow.com/questions/63726655/workaround-for-firefox-bug-on-focus-blur https://stackoverflow.com/questions/26406718/focus-onblur-not-working-in-mozilla

As a workaround, I made a global event listener on the input box rather than used the onBlur provided. Which oddly enough works on Firefox but not Chrome, will be patched in v2.