chakra-ui / ark

A headless library for building reusable, scalable design systems that works for a wide range of JS frameworks.
https://ark-ui.com
MIT License
3.53k stars 99 forks source link

combobox keyboard navigation bug in filtering example #2667

Closed arekmaz closed 1 month ago

arekmaz commented 1 month ago

Description

the issue is reproducible on park-ui website, but I get it too using ark-ui 3.5.0

currently on my website the old version is working properly https://arek-ui.arexoft.com/?q=Combobox

when I enter the example https://park-ui.com/react/docs/components/combobox, click on combobox in demo, using keyboard select "React", then using keyboard delete the value to be empty, and using down arrow select "Vue" from the list

after clicking "Enter", "React" value reappears even tough I have just selected "Vue"

Link to Reproduction (or Detailed Explanation)

https://park-ui.com/react/docs/components/combobox

Steps to Reproduce

  1. go to https://park-ui.com/react/docs/components/combobox

  2. click on combobox in demo

  3. using keyboard select "React",

  4. then using keyboard delete the value to be empty, and using down arrow select "Vue" from the list

  5. after clicking "Enter", "React" value reappears even tough "Vue" was just selected

Ark UI Version

3.5.0

Framework

Browser

Google Chrome

Additional Information

I have the same problem with my components after trying to upgrade to ark-ui 3.5.0

segunadebayo commented 1 month ago

I can't reproduce this in Zag.js or Ark UI docs. So it's probably related to how this is set up in Park UI.

Perhaps it's already fixed but not released cc @cschroeter

arekmaz commented 1 month ago

Here's a repro sandbox - which is just a bit stripped version of the ark-ui demo code, after some clicking around on different options, the inputValue and value get out of sync (look at the console).

image

I have no idea why the ark-ui docs work and this repro, park demo and my own components don't they seem to be almost exactly the same

ark ui demo code park ui demo code my components demo code

segunadebayo commented 1 month ago

After some digging, I found that this was a regression in Zag.js and was fixed in the last two releases.

We need a new release @cschroeter to resolve this issue.

arekmaz commented 1 month ago

Great news, thanks!

Just to understand why it works in ark-ui docs, because it's based on the "current" version of ark, taken directly from the monorepo, not the last released version, right?

segunadebayo commented 1 month ago

New version has been released.

If the issue persists after the release, I'll re-open it.