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

[Select] Keyboard navigation on select with no enabled items causes infinite loop #3388

Closed
Goddak opened this issue Mar 1, 2019 · 3 comments · Fixed by #3627
Closed

[Select] Keyboard navigation on select with no enabled items causes infinite loop #3388

Goddak opened this issue Mar 1, 2019 · 3 comments · Fixed by #3627

Comments

@Goddak
Copy link

Goddak commented Mar 1, 2019

Environment

  • Package version(s): 3.7.0
  • Browser and OS versions: Chrome 72 (Ubuntu 18.04)

Steps to reproduce

  1. Navigate to: https://blueprintjs.com/docs/#select/select-component
  2. Turn on "Disable films before 2000" prop
  3. Open drop-down and filter with 'the god'
  4. Press down arrow

Actual behaviour

Crashes.

Expected behaviour

Same as when no results (filter by "thegod" to test) - nothing should happen when I press an arrow key.

Possible solution

Not investigated

@adidahiya
Copy link
Contributor

Good catch, thanks for the clear repro steps

@Goddak
Copy link
Author

Goddak commented Jun 19, 2019

@adidahiya - Hey bud, any update on this bug?

@adidahiya adidahiya removed their assignment Jun 19, 2019
@vedadeepta
Copy link
Contributor

@adidahiya - seems like this bug is caused due to an infinite loop in getFirstEnabledItem() in select/src/components/query-list/ component when startIndex = -1 and all items are disabled the index variable is stuck in the range of 0 - maxIndex.

@adidahiya adidahiya added this to the next milestone Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants