Skip to content

Autocomplete hardcoded tabindex and broken autofocus #706

@BonaFideIT

Description

@BonaFideIT

Describe the bug

When creating an autocomplete instance as the first input for a form, the autocomplete will be autofocused. The dropdown will appear, but the input field is not focused automatically. Instead it creates a confusing situation where the dropdown appears even if not configured to appear without input.

The tabindex is harcoded as "0" on the container instead of the input field which is probably the reason, also the property is not accessible sadly via a container property something like inputContainer$tabIndex which would help the situation immensely.

To Reproduce

  1. create <form... containing <Autocomplete... as first field
  2. show form in browser and look for autofocus behaviour

Expected behavior

Input field typeable, autofocused should look like if you clicked the input field directly.

Desktop (please complete the following information):

Observed in Desktop, Chrome but probably applicable across the board.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions