primefaces / primereact

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

Dropdown: element loses focus if option is selected with keyboard #7390

Open manuel-bitcraft opened 22 hours ago

manuel-bitcraft commented 22 hours ago

Describe the bug

If you select a dropdown option with the mouse: the element get assigned the class "p-inputwrapper-focus" and the attibute "data-p-focus" is true.

If you select a dropdown option with the keyboard and press enter: the element drop the class "p-inputwrapper-focus" and the attibute "data-p-focus" is false

Reproducer

https://stackblitz.com/run?file=src%2FApp.jsx

System Information

System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 13th Gen Intel(R) Core(TM) i7-1355U
    Memory: 39.19 GB / 63.64 GB
  Binaries:
    Node: 18.20.4 - C:\Program Files\nodejs\node.EXE
    npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (128.0.2739.67)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    primereact: ^10.8.4 => 10.8.4
    react: ^18 => 18.2.0
    tailwindcss: ^3.3.0 => 3.4.1

Steps to reproduce the behavior

No response

Expected behavior

No response

github-actions[bot] commented 11 hours ago

This issue is a duplicate and has already been reported and possibly fixed. Please review other issues both open and closed for a similar issue to this one.

melloware commented 11 hours ago

Duplicate of : https://github.com/primefaces/primereact/issues/6873