primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.64k stars 4.63k forks source link

Focus trapped in Dropdown component #13778

Open JenWue opened 1 year ago

JenWue commented 1 year ago

Describe the bug

When I tab through a form mask containing multiple different input elements using the Tab key after getting the focus inside a PrimeNG Dropdown element the focus is trapped so there is not way to get the focus out using the keyboard navigation. The issue can be easily reproduced on the PrimeNG documentation and example website. Dropdown component should not react with "preventDefault()" on the Tab keydown event.

Environment

Angular 16 (16.2.4) and PrimenNG 16.3.1

Reproducer

No response

Angular version

16.2.4

PrimeNG version

16.3.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

16.20.1

Browser(s)

Chrome 117

Steps to reproduce the behavior

No response

Expected behavior

No response

PedenFraHeden commented 1 year ago

Having the same problem here

ashikjs commented 1 year ago

@JenWue, can you write details or few line about expected behavior.

ashikjs commented 1 year ago

I guesses this issue already reported by others. #13774

arjunreddy-001 commented 1 year ago

I am also facing this issue in v16.5.1 It was working fine in v15.4.1

Below code in v16.5.1 doesn't work with tab traversing - ` <p-dropdown [options]="options" optionLabel="name" optionValue="value" styleClass="p-dropdown-sm" [formControlName]="controlName"

`

But, without options it's working - (without options dropdown is of no use 🤷‍♂️) ` <p-dropdown styleClass="p-dropdown-sm" [formControlName]="controlName"

`

mnhock commented 1 year ago

We run into this issue as well.

richard-collette-precisely commented 2 months ago

Seems to still be an issue and is related to https://github.com/primefaces/primeng/issues/13957