[Hold for payment 2020-08-09] Pressing an arrow key while searching with no results will whitescreen the app
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
- Open Search (CMD + K on mac OS)
- Enter random characters in a way that you get no results
- Press the down arrow, the up arrow or enter
- Whitescreen
Expected Result:
Pressing an arrow key without any option to select shouldn't crash the app.
Actual Result:
The app crashes
Workaround:
Don't press arrow up or arrow down.
Platform:
Where is this issue occurring?
[x] Web iOS Android [x] Desktop App [x] Mobile Web
Version Number: Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation
@amcheler ISSUE: On version v1.0.77-7 desktop, pressing an arrow key while searching with no results will whitescreen the app.
Expensify/Expensify Issue URL:
Triggered auto assignment to @bfitzexpensify (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.
Proposal
I think we can solve this by adding an early return here in case there're are no options to select/choose. https://github.com/Expensify/Expensify.cash/blob/5a8eff84733e89edf0533554a550cf899e6cfa59/src/components/OptionsSelector.js#L116-L126
if (allOptions.length === 0) {
return ;
}
Triggered auto assignment to @Gonals (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Added weekly and firstpick tags! Sending to the pool!
@Gonals Do you think this one be worked by an External/contractor? 😃
Ah yeah I think this one can be external!
Triggered auto assignment to @arielgreen (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Triggered auto assignment to @NikkiWines (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@NikkiWines can you please review @rdjuric's proposal?
@rdjuric's proposal looks good! You're good to hire them @arielgreen
@rdjuric I just sent over an offer.
Paid & bonused for proposing + fixing.
