primefaces / primereact

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

MultiSelect vs Dropdown has different focus behaviour #3721

Closed kroeberk closed 1 year ago

kroeberk commented 1 year ago

Describe the bug

Dear Primereact team,

the two components MultiSelect and Dropdown behave differently. When you click the Dropdown and the dropdown panel opens, the search field has immediate focus. This means you can click and then type and thereby search the items in the field. The MultiSelect (even though it has a search field too) is not automatically focussing on that. Therefore you have to perform an additional click to search that field. I don't think that's intended behavior. Or at least it's inconsistent.

Reproducer

No response

PrimeReact version

8.7.2

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

Only tested for Chrome 107.0.5304.110

Steps to reproduce the behavior

  1. Create two Components, MultiSelect and Dropdown with a few items each
  2. Set filter to true on both
  3. Click on either of the components and see the inconsistent focus behaviour.

Expected behavior

Both fields should on click focus immediately on the search field, just to reduce the amount of clicking.

melloware commented 1 year ago

Its missing filterInputAutoFocus property

mertsincan commented 1 year ago

I think this attribute is not necessary for this issue. In accessibility improvements, such components will have a certain standard.

melloware commented 1 year ago

I will remove the attribute!