Skip to content

Commit

Permalink
fix(button-toggle): allow event bubbling for toggle button clicks (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
josephperrott authored Jun 28, 2018
1 parent 8280a76 commit 5e16682
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/button-toggle/button-toggle.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[attr.name]="name || null"
[attr.aria-label]="ariaLabel"
[attr.aria-labelledby]="ariaLabelledby"
(click)="_onButtonClick($event)">
(click)="_onButtonClick()">
<div class="mat-button-toggle-label-content">
<ng-content></ng-content>
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/lib/button-toggle/button-toggle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,7 @@ export class MatButtonToggle extends _MatButtonToggleMixinBase implements OnInit
}

/** Checks the button toggle due to an interaction with the underlying native button. */
_onButtonClick(event: Event) {
event.stopPropagation();

_onButtonClick() {
const newChecked = this._isSingleSelector ? true : !this._checked;

if (newChecked !== this._checked) {
Expand Down

0 comments on commit 5e16682

Please sign in to comment.