@@ -332,12 +332,18 @@ export class MdCheckbox implements ControlValueAccessor {
332
332
/**
333
333
* Event handler for checkbox input element.
334
334
* Toggles checked state if element is not disabled.
335
+ * Do not toggle on (change) event since IE doesn't fire change event when
336
+ * indeterminate checkbox is clicked.
335
337
* @param event
336
338
*/
337
- _onInteractionEvent ( event : Event ) {
338
- // We always have to stop propagation on the change event.
339
- // Otherwise the change event, from the input element, will bubble up and
340
- // emit its event object to the `change` output.
339
+ _onInputClick ( event : Event ) {
340
+ // We have to stop propagation for click events on the visual hidden input element.
341
+ // By default, when a user clicks on a label element, a generated click event will be
342
+ // dispatched on the associated input element. Since we are using a label element as our
343
+ // root container, the click event on the `checkbox` will be executed twice.
344
+ // The real click event will bubble up, and the generated click event also tries to bubble up.
345
+ // This will lead to multiple click events.
346
+ // Preventing bubbling for the second event will solve that issue.
341
347
event . stopPropagation ( ) ;
342
348
343
349
if ( ! this . disabled ) {
@@ -356,14 +362,10 @@ export class MdCheckbox implements ControlValueAccessor {
356
362
this . _onInputFocus ( ) ;
357
363
}
358
364
359
- _onInputClick ( event : Event ) {
360
- // We have to stop propagation for click events on the visual hidden input element.
361
- // By default, when a user clicks on a label element, a generated click event will be
362
- // dispatched on the associated input element. Since we are using a label element as our
363
- // root container, the click event on the `checkbox` will be executed twice.
364
- // The real click event will bubble up, and the generated click event also tries to bubble up.
365
- // This will lead to multiple click events.
366
- // Preventing bubbling for the second event will solve that issue.
365
+ _onInteractionEvent ( event : Event ) {
366
+ // We always have to stop propagation on the change event.
367
+ // Otherwise the change event, from the input element, will bubble up and
368
+ // emit its event object to the `change` output.
367
369
event . stopPropagation ( ) ;
368
370
}
369
371
0 commit comments