"Go to file" loses the ability to select results if hitting up or down key when results.length==0
STR:
- Go to https://firefox-dev.tools/debugger-examples/examples/todomvc/ and open Debugger
- Use the Ctrl+P shortcut to show the "Go to file" input
- Type a search string that matches nothing, e.g. "fjklsfljkks"
- Hit the Up arrow key once
- Remove the non-matching search string and type "back"
- Hit the Down arrow key once
Expected result:
After step 5, two results show up, with the first result (backbone.js) highlighted in blue.
In step 6, hitting the Down arrow should put the focus on the second result (backbone.localStorage.js).
Actual result: After step 5, two results show up, and no result is highlighted. In step 6, no result is highlighted.
Using React Devtools, it looks like when you hit Up or Down in "Go to file" and there are currently 0 results, the state.selectedIndex ends up being NaN. From them on, if we try to add or substract 1 to that index, it will remain stuck at NaN, breaking the keyboard navigation completely.

Great find @fvsch !
the good ol' divide by zero game!
/claim
Thanks for claiming the issue! :wave:
Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.
:fox_face: Debugger team!