Skip to content

Filtering text causes unexpected scroll position #374

@meesvandongen

Description

@meesvandongen

https://stackblitz.com/~/github.com/meesvandongen/test-shadcn-combobox

Screen.Recording.2025-07-14.at.09.17.30.mov

https://github.com/meesvandongen/test-shadcn-combobox

When filtering a list of many options (such that when the filter is applied, the container is still scrollable), the scroll position of the container does not remain at the top.

The behavior seems to be as follows; given a list of aa - zz, when input is e, the filter result starts with

EA
EB
EC
ED
...

So far, the behavior is as expected; then when inputting another e (ee), the result is

EE
AE
BE
CE
DE

Which may also be fine, but the focus/scroll position is still on the EA (previous first result).

I would expect the focus to be on EE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions