Skip to content

fix(forms): propagate touched state on blur - #786

Open
smartm0use wants to merge 1 commit into
italia:mainfrom
smartm0use:fix/756-propagate-touched
Open

smartm0use wants to merge 1 commit into
italia:mainfrom
smartm0use:fix/756-propagate-touched

Conversation

@smartm0use

Copy link
Copy Markdown
Contributor

Summary

  • always propagate the touched callback when a form component handles blur
  • replace the programmatic touched-state test with real input and blur DOM events
  • restore validation feedback after a user leaves an invalid field

The internal FormControl is already marked as touched by its native value accessor before the component blur handler runs. Checking this.control.touched therefore prevents the outer NgControl callback from being invoked, leaving reactive form controls untouched and suppressing validation feedback.

Verification

  • npm run test (164 specs)
  • npm run lint (existing warnings only)
  • npm run build:lib
  • npm run build
  • npm run schematics:test (21 specs)

Fixes #756

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design-angular-kit Ready Ready Preview Aug 31, 2026 12:01pm

Request Review

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.

[Bug] UI Validazione form non funziona correttamente in versione 21

1 participant