Fix emoji search behavior when deleting all text #8828
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Details
When all the text is deleted from the search, the highlighted emoji index was being reset to
8
(number of columns) instead of-1
(no emoji selected). This behavior was causing bugs like duplicating emoji section headers as well as inserting the textfrequentlyUsed
into the action compose input.Fixed Issues
$ #8824
Tests and QA
NOTE: If you find yourself with multiple emoji section headers, there is only one way to fix them:
NVP.set('expensify_frequentlyUsedEmojis', []);
from the JS consoleTo test that this fix is working properly:
QA Steps
Same as tests
Screenshots
Web
Imagine me pressing enter repeatedly at the end of this video
2022-04-28_18-50-31.mp4
Mobile Web
Does not apply because there is no search box
Desktop
Imagine me pressing enter repeatedly at the end of this video
2022-04-28_18-53-33.mp4
iOS
Does not apply because there is no search box
Android
Does not apply because there is no search box