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

[Vue] ComboboxInput should not trigger selecting option and closing combobox when isComposing is true #1849

Closed
soc221b opened this issue Sep 14, 2022 · 1 comment · Fixed by #1850
Assignees

Comments

@soc221b
Copy link
Contributor

soc221b commented Sep 14, 2022

What package within Headless UI are you using?

@headlessui/vue

What version of that package are you using?

v1.7.1

What browser are you using?

Chrome 105.0.5195.102

Reproduction URL

https://stackblitz.com/edit/github-gdgttl-adfjpj?file=src/views/Home.vue

Describe your issue

ComboboxInput should not trigger selecting option and closing combobox when isComposing is true.

case Keys.Enter:
if (api.comboboxState.value !== ComboboxStates.Open) return
event.preventDefault()
event.stopPropagation()
if (api.activeOptionIndex.value === null) {
api.closeCombobox()
return
}
api.selectActiveOption()
if (api.mode.value === ValueMode.Single) {
api.closeCombobox()
}
break

@RobinMalfait RobinMalfait self-assigned this Sep 14, 2022
@RobinMalfait RobinMalfait changed the title [Vue] ComboboxInput should not trigger selecting option and closing combobox when isComposing is true Prevent option selection in Combobox.Input while composing Sep 14, 2022
@RobinMalfait RobinMalfait changed the title Prevent option selection in Combobox.Input while composing [Vue] ComboboxInput should not trigger selecting option and closing combobox when isComposing is true Sep 14, 2022
@RobinMalfait
Copy link
Collaborator

Hey! Thank you for your bug report!
Much appreciated! 🙏

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

You can already try it using:

  • npm install @headlessui/react@insiders.
  • npm install @headlessui/vue@insiders.

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 a pull request may close this issue.

2 participants