From 4d015cc842b5b375106b73ddf1e2c7ee2d1eb4f3 Mon Sep 17 00:00:00 2001 From: SendilKumar N Date: Tue, 31 May 2016 00:44:24 +0800 Subject: [PATCH 1/2] 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(); } } From 69f3c66d63f82de8619cdd4248c3ef72b58990c7 Mon Sep 17 00:00:00 2001 From: SendilKumar N Date: Tue, 31 May 2016 01:28:43 +0800 Subject: [PATCH 2/2] transition fix --- src/components/checkbox/checkbox.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/checkbox/checkbox.scss b/src/components/checkbox/checkbox.scss index 4564ab1f1764..417be618f456 100644 --- a/src/components/checkbox/checkbox.scss +++ b/src/components/checkbox/checkbox.scss @@ -270,7 +270,7 @@ md-checkbox { opacity: 0; display: inline-flex; justify-content: center; - transition: background-color $md-checkbox-transition-duration + transition-timing-function: background-color $md-checkbox-transition-duration $md-linear-out-slow-in-timing-function, opacity $md-checkbox-transition-duration $md-linear-out-slow-in-timing-function; will-change: background-color, opacity;