Skip to content

Commit

Permalink
Merge pull request #15815 from Sinan997/issue-15794
Browse files Browse the repository at this point in the history
Fix keyboard navigation problem in menu component
  • Loading branch information
cetincakiroglu authored Jun 13, 2024
2 parents 5687124 + 974f811 commit b9a59ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/menu/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ export class Menu implements OnDestroy {

onEnterKey(event) {
const element = DomHandler.findSingle(this.containerViewChild.nativeElement, `li[id="${`${this.focusedOptionIndex()}`}"]`);
const anchorElement = element && DomHandler.findSingle(element, 'a[data-pc-section="action"]');
const anchorElement = element && DomHandler.findSingle(element, 'a');

this.popup && DomHandler.focus(this.target);
anchorElement ? anchorElement.click() : element && element.click();
Expand Down

0 comments on commit b9a59ac

Please sign in to comment.