Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that you can close the combobox initially #1148

Merged
merged 2 commits into from
Feb 24, 2022

Conversation

RobinMalfait
Copy link
Collaborator

The issue is that onInput fires on every keystroke, and we also
handled onChange which is triggered on blur in Vue.

This means that the moment we blur, we also called the handleChange
code to re-open the combobox because we want to open the combobox if
something changes when the user starts typing.

To fix this, we will splitup the logic so that it will only open the
combobox on input but not on change.

Fixes: #1147

The issue is that `onInput` fires on every keystroke, and we also
handled `onChange` which is triggered on blur in Vue.

This means that the moment we blur, we also called the `handleChange`
code to re-open the combobox because we want to open the combobox if
something changes when the user starts typing.

To fix this, we will splitup the logic so that it will only open the
combobox on input but not on change.
@vercel
Copy link

vercel bot commented Feb 24, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

headlessui-vue – ./packages/playground-vue

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-vue/9danQcbY3xfHQEK7H5E8t7SVqZd5
✅ Preview: https://headlessui-vue-git-ensure-initial-close-works-tailwindlabs.vercel.app

headlessui-react – ./packages/playground-react

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-react/55DBaSQU2Uf7PRXWvvcmZG3kHd3t
✅ Preview: https://headlessui-react-git-ensure-initial-close-works-tailwindlabs.vercel.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ComboboxOptions is not hidden when ComboboxInput is blurred
1 participant