Skip to content

fix(settings): clear animation fps limit field on blur when invalid (@karnan7) - #8328

Open
karnan7 wants to merge 1 commit into
monkeytypegame:masterfrom
karnan7:fix/fps-limit-blur-reset
Open

fix(settings): clear animation fps limit field on blur when invalid (@karnan7)#8328
karnan7 wants to merge 1 commit into
monkeytypegame:masterfrom
karnan7:fix/fps-limit-blur-reset

Conversation

@karnan7

@karnan7 karnan7 commented Aug 7, 2026

Copy link
Copy Markdown

Description

When you type letters into the animation fps limit input in Firefox, they stay in the box after you click away, as if they had been accepted. They have not been. Nothing stored or validated them, the text is just left behind on screen.

Firefox does not pass the typed letters to our code. For a number input with bad text it reports the value as empty, so the code thinks the field is empty. On blur the handler resets the field to its default, which for this setting is also empty when native is selected. The value did not change, so Solid skips writing it to the input and the letters remain visible.

On blur we now write the field's current value into the input directly, rather than depending on Solid noticing a change.

Tested by hand in Firefox.
Note on tests: jsdom sanitizes the value the same way Firefox does, so this case cannot be reproduced in a unit test. Verified manually instead.

Closes #8326

@Miodec

Miodec commented Aug 14, 2026

Copy link
Copy Markdown
Member

I think a cleaner fix here would be to add a new resetToDefaultIfInvalidOnBlur param to the InputField that works simmilarly to resetToDefaultIfEmptyOnBlur. Then in the blur handler, if that prop is true and state is invalid, reset the value to default. Then ofcourse use the prop for the fps animation limit element.

@Miodec Miodec added the waiting for update Pull requests or issues that require changes/comments before continuing label Aug 14, 2026
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 waiting for update Pull requests or issues that require changes/comments before continuing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Animation fps limit setting doesn't reset on blur after entering an invalid value

3 participants