Blueprint: [Select] Keyboard navigation on select with no enabled items causes infinite loop

Created on 1 Mar 2019  路  3Comments  路  Source: palantir/blueprint

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

P1 select bug help wanted

All 3 comments

Good catch, thanks for the clear repro steps

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

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tgreenwatts picture tgreenwatts  路  3Comments

shahzeb1 picture shahzeb1  路  3Comments

vilav picture vilav  路  3Comments

raiju picture raiju  路  3Comments

tomzaku picture tomzaku  路  3Comments