fix(forms): clear native date inputs correctly in signal forms when changed via native UI#67416
Open
alxhub wants to merge 1 commit intoangular:mainfrom
Open
fix(forms): clear native date inputs correctly in signal forms when changed via native UI#67416alxhub wants to merge 1 commit intoangular:mainfrom
alxhub wants to merge 1 commit intoangular:mainfrom
Conversation
fb2e95f to
247dc46
Compare
JeanMeche
reviewed
Mar 3, 2026
4688f7f to
b6171df
Compare
…hanged via native UI When a native date input gets cleared manually by a user via the internal browser UI, the element changes from invalid to valid, but no `input` event is emitted. This commit introduces `InputValidityMonitor`, an injectable service that intercepts these edge-case native status changes. The monitor dynamically installs CSP-compliant styles appending specific animation keyframes for `:valid` and `:invalid` pseudoclasses on native form controls. By attaching an `animationstart` listener, Angular intercepts these changes immediately and re-invokes the parser. Fixes angular#67300
b6171df to
6e771ce
Compare
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.
When a native date input gets cleared manually by a user via the internal browser UI, the element changes from invalid to valid, but no
inputevent is emitted.This commit introduces
InputValidityMonitor, an injectable service that intercepts these edge-case native status changes. The monitor dynamically installs CSP-compliant styles appending a specific--ng-validityCSS variable to:validand:invalidpseudoclasses on native form controls as a property transition. By attaching atransitionstartlistener, Angular intercepts these changes immediately and re-invokes the parser.Fixes #67300