Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkbox transition fix #583

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/checkbox/checkbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
[attr.aria-labelledby]="ariaLabelledby"
(focus)="onInputFocus()"
(blur)="onInputBlur()"
(change)="onInteractionEvent($event)">
(change)="onInteractionEvent($event)"
(click)="onInteractionEvent($event)">
<div class="md-ink-ripple"></div>
<div class="md-checkbox-frame"></div>
<div class="md-checkbox-background">
Expand Down
2 changes: 1 addition & 1 deletion src/components/checkbox/checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/components/checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down