Skip to content

Commit b4d05ac

Browse files
committed
fix(radio): keyboard selection doesn't work
1 parent 553f45b commit b4d05ac

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

projects/igniteui-angular/src/lib/radio/radio.component.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[attr.aria-checked]="checked"
1010
[attr.aria-labelledby]="ariaLabelledBy"
1111
[attr.aria-label]="ariaLabel"
12-
(click)="_inputClicked($event)"
12+
(click)="_clicked($event)"
1313
(focus)="onFocus()"
1414
(blur)="onBlur()" />
1515

@@ -23,6 +23,7 @@
2323
</label>
2424

2525
<span #placeholderLabel
26+
(click)="_clicked($event)"
2627
[id]="labelId"
2728
[class]="labelClass">
2829
<ng-content></ng-content>

projects/igniteui-angular/src/lib/radio/radio.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,9 @@ export class IgxRadioComponent implements ControlValueAccessor, EditorProvider {
298298
/**
299299
* @hidden
300300
*/
301-
public _inputClicked(event: MouseEvent) {
301+
public _clicked(event: MouseEvent) {
302302
event.stopPropagation();
303+
this.select();
303304
}
304305

305306
constructor(private cdr: ChangeDetectorRef) { }
@@ -311,7 +312,6 @@ export class IgxRadioComponent implements ControlValueAccessor, EditorProvider {
311312
* ```
312313
* @memberof IgxRadioComponent
313314
*/
314-
@HostListener('click')
315315
public select() {
316316
if (isIE()) {
317317
this.nativeRadio.nativeElement.blur();

0 commit comments

Comments
 (0)