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

Emoji picker - Unable to navigate with arrow keys when there's text in search box #3858

Closed
isagoico opened this issue Jul 1, 2021 · 14 comments · Fixed by #3871
Closed

Emoji picker - Unable to navigate with arrow keys when there's text in search box #3858

isagoico opened this issue Jul 1, 2021 · 14 comments · Fixed by #3871
Assignees
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@isagoico
Copy link

isagoico commented Jul 1, 2021

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Navigate to e.cash
  2. Navigate to a conversation
  3. Click on the emoji icon
  4. Type something in the search box
  5. Press down arrow key to navigate through the options

Expected Result:

User should be able to navigate the emoji list with arrow keys after pressing the down arrow

Actual Result:

Pressing the down arrow does not allow the user to navigate through the emoji list

Workaround:

User has to manually select the emoji with the mouse cursor

Platform:

Where is this issue occurring?

Web ✔️
iOS
Android
Desktop App ✔️
Mobile Web

Version Number: 1.0.74-0

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

2021-07-01_08-53-32.mp4

Expensify/Expensify Issue URL:

View all open jobs on Upwork


From @mallenexpensify https://expensify.slack.com/archives/C01GTK53T8Q/p1625155126323200?thread_ts=1625154887.322400&cid=C01GTK53T8Q

With cursor in compose box, click tab > enter
Start typing a search for an emoji.
Observe you can't click the down arrow to then navigate the emoji selector to choose which emoji you want.

@MelvinBot
Copy link

Triggered auto assignment to @roryabraham (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@roryabraham roryabraham added the External Added to denote the issue can be worked on by a contributor label Jul 2, 2021
@MelvinBot
Copy link

Triggered auto assignment to @MitchExpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@MitchExpensify
Copy link
Contributor

Upwork job!

@parasharrajat
Copy link
Member

parasharrajat commented Jul 2, 2021

Proposal

  1. Due to the recent Upgrade of RN-Web version, we faced one issue where keyboard events are not bubbling from the TextInput. @roryabraham Add capturing event listeners to the KeyboardShortcut library #3555 fixed one of the issues where keyboard shortcut was not opening the search when Focused on the composer.

A similar thing is happening here, we already have arrow navigation for the Emojipicker but events are not bubbling so to fix this we need to attach the event in the capture phase.

So we update this line https://github.com/Expensify/Expensify.cash/blob/824e85f8099cdf903e88107c0b33d47ed93882ff/src/pages/home/report/EmojiPickerMenu/index.js#L113.

as

   document.addEventListener('keydown', this.keyDownHandler, true);

which fixes the arrow navigation.

Suggestion

  1. we block arrows while searching for emojis to enable the arrow navigation on the Emoji picker but that seems a bad UX. Instead, I propose that a Down Arrow key would enable the arrow navigation on the emoji list while the text box is focused or the cursor is visible on the Search box. Then, arrow navigation will run as normal as now. I found that Slack has the same behavior.

Video showing my suggestion with the bug fix. Notice now Arrows are not blocked on the search input and we can move the cursor around.

emojipicker.mp4

@rushatgabhane

This comment has been minimized.

@rushatgabhane

This comment has been minimized.

@roryabraham
Copy link
Contributor

@parasharrajat Great proposal as always! I agree that it's better to allow arrow keys to move the cursor around in the text input, then activate emoji-selection only with the down arrow key. When in the top row of emoji, the up-arrow key should refocus the text input.

@parasharrajat
Copy link
Member

When in the top row of emoji, the up-arrow key should refocus the text input.

Sure, I will add that too. Point taken.

@mallenexpensify
Copy link
Contributor

mallenexpensify commented Jul 14, 2021

This isn't working on Desktop Version 1.0.76-2, regression?

2021-07-14_09-46-10.mp4

@parasharrajat
Copy link
Member

parasharrajat commented Jul 14, 2021

@mallenexpensify Have you used the down arrow key to activate the arrow navigation? More here

Edit:
It's not yet deployed to Staging.

@mallenexpensify
Copy link
Contributor

Yes, I was trying to click the down arrow and nothing happened. I swear it worked days ago....

@parasharrajat
Copy link
Member

parasharrajat commented Jul 14, 2021

Sure, bear with me. As soon as this PR is deployed to Staging, you will get back arrow navigation.

@mallenexpensify
Copy link
Contributor

Desktop just updated to Version 1.0.77-5 (1.0.77-5) and it's working there for now, so closing again. Thanks @parasharrajat

@mallenexpensify
Copy link
Contributor

Paid in Upwork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants