Skip to content

SelectMenu onBlur selects first item when searchable is true #1499

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

Closed
Flowko opened this issue Mar 9, 2024 · 3 comments
Closed

SelectMenu onBlur selects first item when searchable is true #1499

Flowko opened this issue Mar 9, 2024 · 3 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@Flowko
Copy link
Contributor

Flowko commented Mar 9, 2024

Environment

Version

@nuxt/ui-pro v1.0.2

Reproduction

  1. Add a SelectMenu with the searchable prop set to true
  2. No value is yet selected in the SelectMenu
  3. Open the menu
  4. Click outside the menu to cancel the selection
  5. The first item will be selected now

The issue can easily be reproduced with the example from the docs.

Description

When using the SelectMenu with searchable set to true, the first item is selected when clicking outside the menu.

If the selection is cancelled by pressing the esc key the issue does not occur.

seems like this issues still prisists #1252

Additional context

No response

Logs

No response

@Flowko Flowko added the bug Something isn't working label Mar 9, 2024
@madnadyka
Copy link

Have the same issue

@sandros94
Copy link
Member

Instead of opening a new issue you could have more simply commented on that one you linked, but yes as described in the upstream issue this seems by design.

I imagine this being an accessibility issue, since the original intent was that you should use the accessibility navigation buttons to cancel the operation rather then clicking away. Although I also agree with the concept of "clicking away without explicitly selecting something" should also be considered as "canceling the operation".

Since the current rewrite of ui v3.0 (follow updates in #1289) does have the aim of dropping the support of headlessui in favour of radix-vue I would suggest to close this issue and comment on the upstream one.

@benjamincanac benjamincanac added the duplicate This issue or pull request already exists label Mar 25, 2024
@benjamincanac
Copy link
Member

As mentioned in #1252, it's an issue upstream in Headless UI, I had to remove the pinned version of Headless UI at some point which brought back this issue. Unfortunately, we can't do much about it and as @sandros94 said this will be fixed in v3 with the upgrade to radix-vue.

@benjamincanac benjamincanac added the v3 #1289 label Mar 25, 2024
@Flowko Flowko closed this as completed Mar 25, 2024
@benjamincanac benjamincanac removed the v3 #1289 label Jun 5, 2024 — with Volta.net
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants