Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

List Item Steals Focus After Selection #763

Closed
@dawsonc623

Description

@dawsonc623

While running through potential use cases for a filtered list component I am working on, I found a strange bug. Rather than explain it, I figured showing it would be better:

https://codesandbox.io/s/32788k0p5q

Follow these steps:

  1. Enter "little" into the text field.
  2. Press tab, then use the down arrow to highlight "Three Little Code Bugs"
  3. Press enter - everything should clear (this is intentional)
  4. Try to enter "little code" into the text field.

You should find once you get "little c" entered "Nine Little Code Bugs" becomes focused, which is in the slot "Three Little Code Bugs" was when it was originally selected. This behaviour persists until the page is refreshed.

I have not dug into why this is happening yet, but once I get a little more time today or tomorrow I will dive into the code and see what I can find. I figured I would submit this in case someone already has an idea of what might be happening or gets to it before I do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions