Skip to content

Commit

Permalink
fix(module:radio): children unable to focus in radio label (NG-ZORRO#…
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuanxyz authored and vthinkxie committed Jan 30, 2019
1 parent b3b1103 commit 8536b16
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions components/radio/nz-radio.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ export class NzRadioComponent implements ControlValueAccessor, AfterViewInit, On
}
}

@HostListener('click')
onClick(): void {
this.focus();
@HostListener('click', ['$event'])
onClick(event: MouseEvent): void {
// Prevent label click triggered twice.
event.stopPropagation();
event.preventDefault();
if (!this.nzDisabled && !this.checked) {
this.select$.next(this);
if (this.isNgModel) {
Expand Down

0 comments on commit 8536b16

Please sign in to comment.