Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8588
Summary
These settings saved on blur via a field validator (
validators.onBlur → form.handleSubmit()). TanStack Form'ssubmit-event validation re-runs theonChange,onBlurandonSubmitvalidators, sohandleSubmit()re-triggered its own validation — an infinite microtask loop that never yields the main thread (the tab freeze in #8588).The save now lives in the input's blur handler, not a validator, so submit validation can't re-run it:
InputField (ui/form) <input onBlur> reset to default if empty field.handleBlur() - validators.onBlur → form.handleSubmit() ← re-run by submit validation → loop + form.handleSubmit() ← when submitOnBlur (DOM event, not validation)Affected inputs, all converted to
submitOnBlur: min accuracy, min speed, min burst, pace caret, max line width, custom background, andSearchableAutoSetting's number branch (covers fontSize/tapeMargin — the issue notes the same pattern was in the bundle for these).Enter still saves through the form's implicit submit; blur saves without re-entering validation. New
InputFieldbehaviour is covered by two tests (submits afterhandleBlurwhensubmitOnBlur; does not submit by default).Evidence
_handleSubmit → validateAllFields → …).After: dev server, settings page, real interactions on min accuracy (click + Enter; fill + click away) and on fontSize: a follow-up
Runtime.evaluatereturns promptly after each action (a live loop would starve even synchronous evaluates), so the page stays responsive; changed values saved (minAccCustom55, min speed 101, both flipped tocustom).InputFieldspec: 28/28. Full frontend suite: 1849/1849.oxlint --type-aware --type-check: clean.Merge Danger
Door: two-way — small local behaviour move; reverting the commit restores the old (frozen) behaviour, no data or API change.
Blast Radius: settings-page inputs only. A regression would mean these inputs stop saving on blur (or the freeze returns); no other page passes
submitOnBlur.