huntabyte / shadcn-svelte

shadcn/ui, but for Svelte. ✨
https://next.shadcn-svelte.com
MIT License
5.44k stars 340 forks source link

Combobox search input not focusable within Drawer (Svelte 5) #1493

Closed chanmathew closed 1 hour ago

chanmathew commented 4 hours ago

Describe the bug

Hi folks - Please see the below video.

https://github.com/user-attachments/assets/c37ffd5b-911b-4f48-98b3-3ae35d94467e

There are a few issues:

  1. When I have a combobox within a Drawer, I can't seem to select the search input at all
  2. When you select anything, it will immediately close the drawer, which should not be the expected behavior as you may have a form and you need to complete the rest of the inputs

Reproduction

Here's a repro: https://stackblitz.com/edit/github-aibhpm?file=src%2Froutes%2F%2Bpage.svelte

Logs

No response

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @sveltejs/kit: ^2.8.1 => 2.8.1 
    bits-ui: 1.0.0-next.57 => 1.0.0-next.57 
    cmdk-sv: ^0.0.18 => 0.0.18 
    formsnap: ^0.5.0 => 0.5.0 
    lucide-svelte: ^0.459.0 => 0.459.0 
    mode-watcher: ^0.2.1 => 0.2.1 
    svelte: ^5.2.0 => 5.2.0 
    svelte-sonner: ^0.3.28 => 0.3.28 
    sveltekit-superforms: ^2.20.1 => 2.20.1 
    vaul-svelte: ^0.3.2 => 0.3.2

Severity

annoyance

huntabyte commented 3 hours ago

You should be using vaul-svelte@next and shouldn't be using cmdk-sv should be using Command from bits-ui@next instead 😃

chanmathew commented 1 hour ago

@huntabyte Thanks that seems to work!