[Bug] Custom font size accepts extreme values (e.g., 100,000), causing UI rendering failure
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
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?
Hi, it was a quick fix it would be great if someone reviewed my PR!
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!
Nope just waiting on approval!