You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MdCheckbox disabled by FormControl API cannot be enabled if clicked while disabled #4037
Hookup a MdCheckbox to a FormControl. disable(), try to click check, and enable() the form control.
Checkbox appears enabled but cannot be focused or checked/un-checked.
What is the expected behavior?
Checkbox should be able to be disabled/enabled using FormControl API and user interacting with disabled checkbox should not break it.
What is the current behavior?
checkbox works fine initially
disable()
Try clicking checkbox. First click causes ripple effect on check. More clicks do nothing
enable()
style changes to primary color, but cannot be clicked. Also, cannot be tab-focused
Sometimes I see:
ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'true'. Current value: 'false'.
This seems to depend on whether you toggled the checkbox before disabling it.
Also, in my own app with a ReactiveForm FormGroup, the checkbox is broken after disable()/enable() even without interacting with it. I call disable() in response to the entire form's valueChanges.
This would be more difficult to create a demo for. But after you push a fix to master I can test if the bug went away in my own app.
Activity
arlowhite commentedon Apr 11, 2017
Also, in my own app with a ReactiveForm FormGroup, the checkbox is broken after
disable()/enable()even without interacting with it. I calldisable()in response to the entire form's valueChanges.This would be more difficult to create a demo for. But after you push a fix to master I can test if the bug went away in my own app.
mmacfadden commentedon Apr 12, 2017
We are also experiencing this same issue.
angular-automatic-lock-bot commentedon Sep 5, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.