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
When the checkbox is indeterminate state, clicking on the checkbox should trigger toggle event and change the checkbox's checked status.
What is the current behavior?
The first click doesn't work. User need to click on the checkbox twice to trigger toggle.
What are the steps to reproduce?
Visit material2-dev.firebaseapp.com
Click 'Toggle Indeterminate'
Click on the checkbox (the checked value should change from Maybe! to Yes!, but it didn't)
Click on the cehckbox again (checked became Yes!)
IE handles indeterminate checkboxes "differently", it doesn't fire an
onChange event when a checkbox goes from indeterminate to a determinate
state.
This issue is well documented on the jquery github issue:
jquery/jquery#1698
The generally accepted solution is to use the onClick event instead of the
onChange event. You can see this solution implemented in the google's angular
material design library in their github link here:
angular/components#3145
I applied a similar approach to normalize the events we listen to for the
indeterminate all checkbox and commented why those things are done in the
code so this issue won't regress.
Bug, feature request, or proposal:
Bug
What is the expected behavior?
When the checkbox is indeterminate state, clicking on the checkbox should trigger toggle event and change the checkbox's
checked
status.What is the current behavior?
The first click doesn't work. User need to click on the checkbox twice to trigger toggle.
What are the steps to reproduce?
Visit material2-dev.firebaseapp.com
Click 'Toggle Indeterminate'
Click on the checkbox (the checked value should change from Maybe! to Yes!, but it didn't)
Click on the cehckbox again (checked became Yes!)
Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: http://plnkr.co/edit/o077B6uEiiIgkC0S06dd
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, browsers are affected?
IE on Surface
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: