René's URL Explorer Experiment


Title: Signal Forms: a FormValueControl stays out of sync when its field is set back to the value it last received · Issue #72065 · angular/angular · GitHub

Open Graph Title: Signal Forms: a FormValueControl stays out of sync when its field is set back to the value it last received · Issue #72065 · angular/angular

X Title: Signal Forms: a FormValueControl stays out of sync when its field is set back to the value it last received · Issue #72065 · angular/angular

Description: Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description I maintain a component library and moved one of our inputs to a FormValueControl for Angular 22. While testing it, I found a case where the...

Open Graph Description: Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description I maintain a component library and moved one of our inputs to a FormValueControl for Angular 22. Wh...

X Description: Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description I maintain a component library and moved one of our inputs to a FormValueControl for Angular 22. Wh...

Opengraph URL: https://github.com/angular/angular/issues/72065

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Signal Forms: a FormValueControl stays out of sync when its field is set back to the value it last received","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nforms\n\n### Is this a regression?\n\nNo\n\n### Description\n\nI maintain a component library and moved one of our inputs to a `FormValueControl` for Angular 22. While testing it, I found a case where the control and its field stop agreeing on the value, and nothing brings them back together.\n\nIt happens when the control writes its own `value`, and then, before change detection runs, the field is set back to the value the control last received from it. The field ends up with that value, but the control keeps the one it wrote.\n\nHere's a small example: a text input that clears itself on Escape, inside a form that resets on Escape. Both handlers run for the same keypress. It's a complete `src/main.ts`, so it can be pasted into a new Angular project as is.\n\n```ts\nimport { Component, model, signal, viewChild } from '@angular/core';\nimport { FormField, FormValueControl, form } from '@angular/forms/signals';\nimport { bootstrapApplication } from '@angular/platform-browser';\n\n@Component({\n  selector: 'app-clearable-input',\n  template: `\u003cinput #input [value]=\"value()\" (input)=\"value.set(input.value)\" (keydown.escape)=\"value.set('')\" />`,\n})\nexport class ClearableInput implements FormValueControl\u003cstring> {\n  readonly value = model('');\n}\n\n@Component({\n  selector: 'app-root',\n  imports: [FormField, ClearableInput],\n  template: `\n    \u003cdiv (keydown.escape)=\"nameForm().reset({ name: 'Ada' })\">\n      \u003capp-clearable-input [formField]=\"nameForm.name\" />\n    \u003c/div>\n    \u003cp>Field value: \"{{ nameForm.name().value() }}\"\u003c/p>\n    \u003cp>Control value: \"{{ control().value() }}\"\u003c/p>\n  `,\n})\nexport class App {\n  protected readonly nameForm = form(signal({ name: 'Ada' }));\n  protected readonly control = viewChild.required(ClearableInput);\n}\n\nbootstrapApplication(App);\n```\n\nClick into the input and press Escape without typing first. The field says \"Ada\", but the control, and the input on screen, are empty. Pressing Escape again doesn't help. If you type something before pressing Escape, both end up at \"Ada\" as expected. Setting the field with `nameForm.name().value.set('Ada')` instead of `reset()` goes wrong the same way.\n\nFrom reading the source, I think the cause is in `customControlCreate` in `packages/forms/signals/src/directive/control_custom.ts`. It only pushes `controlValue` into the control when it differs from the value it pushed last time. When the control writes its own model, the `listenToCustomControlModel` callback updates the field but not that remembered value, so setting the old value again looks like no change and is skipped. The CVA path in `control_cva.ts` already handles this: its `registerOnChange` callback updates the remembered value, which came in with #67866 for #67847. I tried the same change in the custom control path locally (setting `bindings['controlValue'] = value` in that callback) and it fixes the example above.\n\nThis looks related to #57124 and #59376, where a `model()` input drifts away from a binding that sets the same value again. There it was described as the contract of a one-way `[x]` binding, but `[formField]` keeps the field and the control in sync in both directions, so here it seems like a bug rather than a design question.\n\n### Please provide a link to a minimal reproduction of the bug\n\nThe example in the description is a complete `src/main.ts`: paste it into a new Angular 22 project (for example `ng new --minimal`) and run `ng serve`.\n\n### Please provide the exception or error you saw\n\n```true\nNo error. The control and its field silently hold different values.\n```\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI       : 22.2.7\nAngular           : 22.2.6\nNode.js           : 24.15.0\nPackage Manager   : npm 11.12.1\nOperating System  : win32 x64\n\nPackage                     Installed Version\n@angular/build              22.2.7\n@angular/cli                22.2.7\n@angular/common             22.2.6\n@angular/compiler           22.2.6\n@angular/compiler-cli       22.2.6\n@angular/core               22.2.6\n@angular/forms              22.2.6\n@angular/platform-browser   22.2.6\n@angular/router             22.2.6\nrxjs                        7.8.2\ntypescript                  6.0.3\n```\n\n### Anything else?\n\nIt also happens on 22.1.0 and 22.3.0-rc.0. The custom control code looks the same in 21.2.x, which is why I answered \"No\" to the regression question.\n\nGitHub suggested #70734, #71127 and #71679 as possible duplicates. I read them, and they're different problems: `updateOn` being ignored under reactive forms, parse errors arriving one change detection late, and `model.subscribe` not firing on form updates.","author":{"url":"https://github.com/StojanovicMilos","@type":"Person","name":"StojanovicMilos"},"datePublished":"2026-11-16T13:43:55Z","url":"https://github.com/angular/angular/issues/72065"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:bb00ac38-6bf6-2563-c253-396ff53a97c9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB8F8:1F927B:104DAFB:158ACA3:6B01DB77
html-safe-nonce6a2e7fd0ba1693ec868ed6cb837dee5e358c28a8356e50a64bf73b1fed0365b4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOEY4OjFGOTI3QjoxMDREQUZCOjE1OEFDQTM6NkIwMURCNzciLCJ2aXNpdG9yX2lkIjoiMTk5NDE1OTU1MzYyMDU5NzYyMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaccd04f39fe0dbeda20f9878c8f0dcd128c13c856dff180f0f3e9587ca111e997c
hovercard-subject-tagissue:6422561829
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/72065/issue_layout
twitter:imagehttps://opengraph.githubassets.com/98e5fcebb4eca687cf05277219ddeaf0e98024632fbbdbd39dec88215f184bd6/angular/angular/issues/72065
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/98e5fcebb4eca687cf05277219ddeaf0e98024632fbbdbd39dec88215f184bd6/angular/angular/issues/72065
og:image:altWhich @angular/* package(s) are the source of the bug? forms Is this a regression? No Description I maintain a component library and moved one of our inputs to a FormValueControl for Angular 22. Wh...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameStojanovicMilos
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/angular/angular git https://github.com/angular/angular.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id24195339
octolytics-dimension-repository_nwoangular/angular
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24195339
octolytics-dimension-repository_network_root_nwoangular/angular
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular/issues/72065#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F72065
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F72065
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular
Reloadhttps://github.com/angular/angular/issues/72065
Reloadhttps://github.com/angular/angular/issues/72065
Reloadhttps://github.com/angular/angular/issues/72065
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues835 (835)https://github.com/angular/angular/issues
Pull requests142 (142)https://github.com/angular/angular/pulls
Discussionshttps://github.com/angular/angular/discussions
Actionshttps://github.com/angular/angular/actions
Projectshttps://github.com/angular/angular/projects
Security and quality40 (40)https://github.com/angular/angular/security
Insightshttps://github.com/angular/angular/insights
https://github.com/angular/angular
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/72065
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/72065
#72097https://github.com/angular/angular/pull/72097
Signal Forms: a FormValueControl stays out of sync when its field is set back to the value it last receivedhttps://github.com/angular/angular/issues/72065#top
#72097https://github.com/angular/angular/pull/72097
area: formshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20forms%22
forms: signalshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22forms%3A%20signals%22
needsTriagehttps://github.com/angular/angular/milestone/83
https://github.com/StojanovicMilos
StojanovicMiloshttps://github.com/StojanovicMilos
on Nov 16, 2026https://github.com/angular/angular/issues/72065#issue-6422561829
#67866https://github.com/angular/angular/pull/67866
#67847https://github.com/angular/angular/issues/67847
#57124https://github.com/angular/angular/issues/57124
#59376https://github.com/angular/angular/issues/59376
#70734https://github.com/angular/angular/issues/70734
#71127https://github.com/angular/angular/issues/71127
#71679https://github.com/angular/angular/issues/71679
angular-robothttps://github.com/apps/angular-robot
area: formshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20forms%22
on Nov 16, 2026https://github.com/angular/angular/issues/72065#event-36282536854
angular-robothttps://github.com/apps/angular-robot
needsTriagehttps://github.com/angular/angular/milestone/83
on Nov 16, 2026https://github.com/angular/angular/issues/72065#event-36282539758
JeanMechehttps://github.com/JeanMeche
forms: signalshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22forms%3A%20signals%22
on Nov 16, 2026https://github.com/angular/angular/issues/72065#event-36282735995
github-project-automationhttps://github.com/apps/github-project-automation
Signal Formshttps://github.com/orgs/angular/projects/60
on Nov 16, 2026https://github.com/angular/angular/issues/72065#event-36282739298
nagahara-naokihttps://github.com/nagahara-naoki
on Nov 18, 2026https://github.com/angular/angular/issues/72065#event-36591002197
fix(forms): restore custom control values when a field change is reve…https://github.com/nagahara-naoki/angular/commit/1618c05fd69b2a91195845172497b31b64774c60
https://docs.github.com/articles/closing-issues-via-commit-messages
1618c05https://github.com/nagahara-naoki/angular/commit/1618c05fd69b2a91195845172497b31b64774c60
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular/issues/72065
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular/issues/72065
area: formshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20forms%22
forms: signalshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22forms%3A%20signals%22
Signal Formshttps://github.com/orgs/angular/projects/60
needsTriageNo due datehttps://github.com/angular/angular/milestone/83
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.