Skip to content

Commit

Permalink
fix(forms): focus checkbox/radio elements on click
Browse files Browse the repository at this point in the history
Previously, checkbox/radio elements were not focused on click of the
checkbox/radio. Clicking the label worked correctly, but not clicking
the checkbox/radio itself.

closes #198
  • Loading branch information
kevinbuhmann committed Jan 5, 2023
1 parent 5b1a6e0 commit c932284
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export class CdsInternalControlInline extends CdsControl {
}

private selectInput(e: any) {
this.inputControl.focus();
this.inputControl.click();
e.preventDefault(); // prevent any events from the input div, only the native input
}
Expand Down

0 comments on commit c932284

Please sign in to comment.