Skip to content

Commit

Permalink
Merge pull request primefaces#15612 from f94e59/fix/aria_chips_space_…
Browse files Browse the repository at this point in the history
…click

fix(chips): trigger itemClick event with 'Space' key
  • Loading branch information
cetincakiroglu authored May 30, 2024
2 parents 6a9ddf6 + cfe02dc commit 6f810e1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/components/chips/chips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,12 @@ export class Chips implements AfterContentInit, ControlValueAccessor {
this.onBackspaceKeyOn(event);
break;

case 'Space':
if (this.focusedIndex !== null && this.value && this.value.length > 0) {
this.onItemClick(event, this.value[this.focusedIndex]);
}
break;

default:
break;
}
Expand Down

0 comments on commit 6f810e1

Please sign in to comment.