Skip to content

Command does not scroll selected value into view #1839

@AndersRobstad

Description

@AndersRobstad

Describe the bug

This was also mentioned in #1822 but does was not included in the fix in #1837 . The Command does not scroll the initial value into view. I would expect a the behavior here as the Select has, where the initial value is scrolled to if it's outside the viewport of the content.

Shown in the stackblitz repro below i would expect the combobox-2 option to be visible when the command renders.

Reproduction

https://agvtegiy-gh7zywct.stackblitz.io

Logs

System Info

System:
    OS: macOS 26.0.1
    CPU: (10) arm64 Apple M2 Pro
    Memory: 108.75 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.15.0 - /**/.nvm/versions/node/v22.15.0/bin/node
    npm: 10.9.2 - /**/.nvm/versions/node/v22.15.0/bin/npm
    pnpm: 10.15.1 - /**/Library/pnpm/pnpm
  Browsers:
    Brave Browser: 137.1.79.118
    Chrome: 141.0.7390.107
    Edge: 141.0.3537.71
    Firefox: 138.0.4
    Safari: 26.0.1
  npmPackages:
    @sveltejs/kit: 2.47.0 => 2.47.0 
    bits-ui: 2.11.8 => 2.11.8 
    svelte: ^5.40.2 => 5.40.2

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageA maintainer needs to review this issue and label it appropriately

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions