headlessui icon indicating copy to clipboard operation
headlessui copied to clipboard

[Bug]: Combobox breaks when selecting a value using the keyboard

Open velopsey opened this issue 11 months ago • 1 comments

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

v2.2.0

What browser are you using?

All

Reproduction URL

https://stackblitz.com/edit/vitejs-vite-coiqswwa?file=src%2FApp.jsx

Describe your issue

When selecting a value using the mouse, the combobox functions as expected. However, if a value is selected using the keyboard (via the Enter key), the programmatic reset no longer works as intended.

https://github.com/user-attachments/assets/e679d996-f3f0-4a23-8f68-fe5525a70161

velopsey avatar Dec 14 '24 10:12 velopsey

Thank you for your work! We find your library very convenient.
I can resolve this issue on my own if you help me review my PR. Thanks!

velopsey avatar Mar 15 '25 10:03 velopsey

This should be fixed by #3785, and will be available in the next release.

You can already try it using:

  • npm install @headlessui/react@insiders.

RobinMalfait avatar Sep 05 '25 12:09 RobinMalfait