primefaces / primereact

The Most Complete React UI Component Library
https://primereact.org
MIT License
6.2k stars 960 forks source link

ListBox: focusable using keyboard only once #6743

Open agbucz opened 3 weeks ago

agbucz commented 3 weeks ago

Describe the bug

Entry of ListBox is focusable using the Tab key only once (after the page is loaded). It is impossible to access the same ListBox a second time using the Tab or Shift+Tab.

Reproducer

https://stackblitz.com/edit/vitejs-vite-dtc2y2

PrimeReact version

10.6.6

React version

18.x

Language

ES6

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Click/Focus on element before ListBox.
  2. Press Tab on keyboard (OK - focus is on ListBox)
  3. Press Tab on keyboard (focus is on next element)
  4. Press Shift+Tab on keyboard (NOT OK - ListBox is omitted)
  5. Press Tab on keyboard (NOT OK - ListBox is omitted)

Expected behavior

You can focus the ListBox multiple times using Tab or Shift + Tab.

KirilCycle commented 3 weeks ago

For some reason ListBox applies negative tabindex to himself, ill take a look