Skip to content

Admin: Validate color fields on blur and count edits while focused - #390

Merged
lehni merged 1 commit into
mainfrom
fix/field-blur-validation
Oct 17, 2026
Merged

lehni merged 1 commit into
mainfrom
fix/field-blur-validation

Conversation

@lehni

@lehni lehni commented Oct 17, 2026

Copy link
Copy Markdown
Contributor
  • Color fields wrote the color typed into them only after the blur, so the blur never validated it, and errors only showed on submit. onBlur() now writes it first.
  • useField() only counts changes as edits while the field is focused, and resets the flag on blur instead of on focus. This states the rule "validate fields on blur that were edited while focused" directly; no field behaves differently.
  • Tests that typed into fields without focusing them now focus them first, as browsers do.
  • Changelog: corrects the entries for HEAD requests (GET handlers run for them), normalizeDataPath() (.. right after // throws) and capitalize() (join table column names), and adds the color fix.

- Write the color typed into a color field before the blur validates it
- Only count changes as edits while the field is focused, and reset the
  flag on blur
- Focus fields in tests before typing into them, as browsers do
- Correct and complete the unreleased changelog entries
@lehni
lehni merged commit 071ba8e into main Oct 17, 2026
8 checks passed
@lehni
lehni deleted the fix/field-blur-validation branch October 17, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant