Skip to content

Commit 9643acc

Browse files
josephperrottvictoriaaa234
authored andcommitted
fix(button-toggle): allow event bubbling for toggle button clicks (#11951)
1 parent 599d449 commit 9643acc

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/lib/button-toggle/button-toggle.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[attr.name]="name || null"
77
[attr.aria-label]="ariaLabel"
88
[attr.aria-labelledby]="ariaLabelledby"
9-
(click)="_onButtonClick($event)">
9+
(click)="_onButtonClick()">
1010
<div class="mat-button-toggle-label-content">
1111
<ng-content></ng-content>
1212
</div>

src/lib/button-toggle/button-toggle.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,9 +436,7 @@ export class MatButtonToggle extends _MatButtonToggleMixinBase implements OnInit
436436
}
437437

438438
/** Checks the button toggle due to an interaction with the underlying native button. */
439-
_onButtonClick(event: Event) {
440-
event.stopPropagation();
441-
439+
_onButtonClick() {
442440
const newChecked = this._isSingleSelector ? true : !this._checked;
443441

444442
if (newChecked !== this._checked) {

0 commit comments

Comments
 (0)