Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using arrow down starts from the second item #520

Open
marcelosramos opened this issue Jun 15, 2018 · 1 comment
Open

Using arrow down starts from the second item #520

marcelosramos opened this issue Jun 15, 2018 · 1 comment

Comments

@marcelosramos
Copy link

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?

@marcelosramos
Copy link
Author

This only happens when minlength="0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant