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

[Bug]: "Tags with combobox" example inserts ComboboxContent twice #925

Open
2 tasks
JarvisH opened this issue Nov 29, 2024 · 1 comment
Open
2 tasks

[Bug]: "Tags with combobox" example inserts ComboboxContent twice #925

JarvisH opened this issue Nov 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@JarvisH
Copy link

JarvisH commented Nov 29, 2024

Reproduction

https://www.shadcn-vue.com/docs/components/tags-input.html#tags-with-combobox

Describe the bug

The official example of using a "Tags input" with a combobox inserts the ComboboxContent twice. Once via direct usage of <ComboboxContent /> and again via <CommandList /> which contains another instance of <ComboboxContent />.

This results in two wrapper divs containing identical roles and ids.

Screenshot 2024-11-29 at 13 45 36

System Info

N/A

Contributes

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests
@JarvisH JarvisH added the bug Something isn't working label Nov 29, 2024
@JarvisH
Copy link
Author

JarvisH commented Nov 29, 2024

I should add, that simply removing the first instance of <ComboboxContent /> fixes the issue, but this necessitates adding :dismissable="true" to <CommandList />

Edit: :dismissable="true" messes with Firefox, the list no longer closes when using the tab key. To fix this sideeffect, I added tabindex="-1" to <CommandList />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant