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

Using arrow down starts from the second item #520

Description

@marcelosramos

Hi,

First, thank you for this autocomplete, it is really usefull.

But I have this issue: given I enter the input for the first time, when I press the arrow down key, then it jumps straight to the second item.

This issue happens because of this code in line 96: scope.currentIndex = scope.focusFirst ? 0 : null; and null is coerced 0 when scope.currentIndex++ for the first time.

Shouldn't it be initialised with -1 instead of null? Would be there any side effects of doing so?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions