mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(button-toggle): allow event bubbling for toggle button clicks (#11951)
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user