Skip to content

Arrow key navigation in search dropdown doesn't scroll highlighted item into view #45

Description

@mlz11

Bug

When navigating the monster search dropdown with arrow keys, the highlight moves correctly but the list doesn't scroll to keep the highlighted item visible. If the highlighted item goes below (or above) the visible area of the dropdown, the user can't see which monster is selected.

Steps to reproduce

  1. Type a letter that returns many results (e.g., "a")
  2. Press ArrowDown repeatedly
  3. Once the highlight passes the bottom of the visible dropdown area (~240px), the selected item is no longer visible

Expected behavior

The dropdown should automatically scroll to keep the highlighted item in view as the user navigates with arrow keys.

Root cause

SearchBar.tsx updates highlightIndex on ArrowDown/ArrowUp but never calls scrollIntoView() on the highlighted list item. The dropdown has max-height: 240px and overflow-y: auto, so items beyond the visible area are scrollable but not programmatically scrolled.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: searchSearchBar, autocomplete, keyboard navigationpriority: lowNice to have, cosmetictype: bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions