monkeytype icon indicating copy to clipboard operation
monkeytype copied to clipboard

[Bug] Custom font size accepts extreme values (e.g., 100,000), causing UI rendering failure

Open ThomyWhomy opened this issue 1 month ago • 4 comments

Did you clear cache before opening an issue?

  • [x] I have cleared my cache

Is there an existing issue for this?

  • [x] I have searched the existing open and closed issues

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

cheemssss

Account config

No response

Current Behavior

The custom font size input field lacks an upper limit or validation cap. When a user inputs an extreme value (e.g., 100,000) into the font size setting via the command palette or settings menu, the viewport breaks entirely. Instead of rendering text, the test container becomes a massive, unplayable blank space. I am testing on a Pixel 9 Pro, I am not sure if this is an issue with the desktop version of the site aswell

In the attached video file you can see me reproducing this bug.

https://github.com/user-attachments/assets/e9349684-151d-4122-a2b4-7d2dc60e4967

.

Expected Behavior

The font size input should have a hard-coded maximum limit (e.g., a clamp capping it at a reasonable maximum like 10 or 20) to prevent users from accidentally or intentionally breaking the UI rendering and soft-locking the test viewport

Steps To Reproduce

Steps to Reproduce: 1 .Open a mobile browser on a mobile device (e.g., Google Pixel 9 Pro). 2. Navigate to monkeytype.com. 3. Open the Settings page (via the gear icon) or use the Command Palette. 4. Locate the "font size" custom input field. 5. Enter an extreme numerical value, such as 100000. 6. Return to the main typing test screen. 7. Observe that the text fails to render, replacing the test container with a massive blank space that makes the typing test completely unplayable (though the settings menu remains accessible).

Environment

  • OS: Android
  • Browser: Google Chrome
  • Browser Version: 154.0.8037.126

Anything else?

No response

ThomyWhomy avatar Oct 10 '26 18:10 ThomyWhomy

I reproduced this on my phone and would like to work on a fix. If no one is already working on it, could you assign this issue to me?

Cyronite avatar Oct 11 '26 00:10 Cyronite

Hi, it was a quick fix it would be great if someone reviewed my PR!

Cyronite avatar Oct 11 '26 01:10 Cyronite

Hi, I noticed that this issue is still marked as open. Is there any update on the status of the linked fix/PR, or is there anything else needed before this issue can be closed?

Thanks for your work on this!

msvicky29 avatar Nov 11 '26 10:11 msvicky29

Nope just waiting on approval!

Cyronite avatar Nov 11 '26 19:11 Cyronite