From 4d015cc842b5b375106b73ddf1e2c7ee2d1eb4f3 Mon Sep 17 00:00:00 2001 From: SendilKumar N Date: Tue, 31 May 2016 00:44:24 +0800 Subject: [PATCH] checkbox fix for #575 --- src/components/checkbox/checkbox.html | 3 ++- src/components/checkbox/checkbox.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/checkbox/checkbox.html b/src/components/checkbox/checkbox.html index c1fff754de90..49392e9ac63f 100644 --- a/src/components/checkbox/checkbox.html +++ b/src/components/checkbox/checkbox.html @@ -11,7 +11,8 @@ [attr.aria-labelledby]="ariaLabelledby" (focus)="onInputFocus()" (blur)="onInputBlur()" - (change)="onInteractionEvent($event)"> + (change)="onInteractionEvent($event)" + (click)="onInteractionEvent($event)">
diff --git a/src/components/checkbox/checkbox.ts b/src/components/checkbox/checkbox.ts index 65045f1c1b17..ec6ce86848e5 100644 --- a/src/components/checkbox/checkbox.ts +++ b/src/components/checkbox/checkbox.ts @@ -258,10 +258,10 @@ export class MdCheckbox implements AfterContentInit, ControlValueAccessor { onInteractionEvent(event: Event) { // We always have to stop propagation on the change event. // Otherwise the change event, from the input element, will bubble up and - // emit its event object to the `change` output. + // emit its event object to the `change` output. event.stopPropagation(); - if (!this.disabled) { + if (!this.disabled && event.type === 'change') { this.toggle(); } }