nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
4.1k stars 537 forks source link

[UDropdown] with [UInput] does not insert space when typing space #2617

Closed benemohamed closed 1 week ago

benemohamed commented 1 week ago

Environment


Version

v2.19.2

Reproduction

https://stackblitz.com/edit/nuxt-ui-9tyhma

Description

the issue prevents users from entering text with spaces

Additional context

No response

Logs

sandros94 commented 1 week ago

Thanks to @gioboa for finding out that this appears to be an upstream issue in their implementation for the handleKeyDown's switch case. This means that the space falls through the next enter case (as per spec) unless it is specifically a search query

sandros94 commented 1 week ago

For now you could take a look at this old suggestion

You might be able to solve this by defining a click function inside your item:

click: (e) => {
  e.preventDefault()
}
benemohamed commented 1 week ago

Thanks for this!

I tried the solution above and still have same issues

sandros94 commented 6 days ago

I've noticed that some @input events don't get triggered, but @keydown do, but this also applies upstream