Title: Radio CVA has wrong behavior with callSetDisabledState = 'whenDisabledForLegacyCode' · Issue #53240 · angular/angular · GitHub
Open Graph Title: Radio CVA has wrong behavior with callSetDisabledState = 'whenDisabledForLegacyCode' · Issue #53240 · angular/angular
X Title: Radio CVA has wrong behavior with callSetDisabledState = 'whenDisabledForLegacyCode' · Issue #53240 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description Angular v15 fixed a long-standing bug related to setDisabledState not always being called. The fix was a breaking change, so a configuratio...
Open Graph Description: Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description Angular v15 fixed a long-standing bug related to setDisabledState not always being called. The fix ...
X Description: Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description Angular v15 fixed a long-standing bug related to setDisabledState not always being called. The fix ...
Opengraph URL: https://github.com/angular/angular/issues/53240
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Radio CVA has wrong behavior with callSetDisabledState = 'whenDisabledForLegacyCode'","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\nAngular v15 fixed a [long-standing bug](https://github.com/angular/angular/issues/35309) related to `setDisabledState` not always being called. The fix was a breaking change, so a configuration option, `callSetDisabledState`, was also introduced to provide a way to opt into the old, \"legacy\" behavior. The bug fix also caused a problem for radio buttons that was [subsequently fixed](https://github.com/angular/angular/pull/48864/) by making the radio CVA default to using the \"legacy\" behavior. However, if you use the configuration option to opt into the legacy behavior (i.e. `callSetDisabledState = 'whenDisabledForLegacyMode'`), the radio CVA **uses the non-legacy behavior**. Here is a visual matrix of the scenarios:\r\n\r\nThis does not make sense. There is no reason that using `'whenDisabledForLegacyMode'` should make the radio CVA use a non-legacy, problematic behavior.\r\n\r\n[The code](https://github.com/angular/angular/blob/b76b3c619bc2ff9ffdd436559a7550398a810b10/packages/forms/src/directives/radio_control_value_accessor.ts#L223) is straightforward. It should just not include `|| callSetDisabledState === 'whenDisabledForLegacyMode'` in the condition.\n\n### Please provide a link to a minimal reproduction of the bug\n\n_No response_\n\n### Please provide the exception or error you saw\n\n_No response_\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n_No response_\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/m-akinc","@type":"Person","name":"m-akinc"},"datePublished":"2023-11-28T23:34:01Z","url":"https://github.com/angular/angular/issues/53240"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5b7cf4a4-653c-a812-245a-f038355bbb88 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B186:27D3AD:1F28AD0:27846D5:6B0165C5 |
| html-safe-nonce | b53e8aba0f7304f0edd070c29ab7dadc33f16586db141d2e5ba4a22b2dd168fb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTg2OjI3RDNBRDoxRjI4QUQwOjI3ODQ2RDU6NkIwMTY1QzUiLCJ2aXNpdG9yX2lkIjoiNjY4MDk5NzEwNTkwNzA5OTA3OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f4b4862256b23405270116d5803ce7260b2a6ab54db2e706db880aa9282d88b4 |
| hovercard-subject-tag | issue:2015499182 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/53240/issue_layout |
| twitter:image | https://opengraph.githubassets.com/80b5201537237c111d217aa6974814ae7a15ca1617b328906853137f531f95b8/angular/angular/issues/53240 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/80b5201537237c111d217aa6974814ae7a15ca1617b328906853137f531f95b8/angular/angular/issues/53240 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description Angular v15 fixed a long-standing bug related to setDisabledState not always being called. The fix ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | m-akinc |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width