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

Arrow keys don't work in popup menu #701

Closed
Tracked by #1793
smbea opened this issue Nov 21, 2022 · 3 comments · Fixed by #710
Closed
Tracked by #1793

Arrow keys don't work in popup menu #701

smbea opened this issue Nov 21, 2022 · 3 comments · Fixed by #710
Assignees
Labels
bug Something isn't working

Comments

@smbea
Copy link
Contributor

smbea commented Nov 21, 2022

Describe the Bug

Arrow keys don't work in popup menu when search is turned off

Steps to Reproduce

Steps to reproduce the behavior:

Screen.Recording.2022-11-21.at.09.56.30.mov
  1. open popup menu for sub process
  2. use arrow up/down
  3. see that element moves instead of navigating the menu

Expected Behavior

The arrow keys should result in menu navigation

Environment

Please complete the following information:

  • Library version: 11.0.0
@smbea smbea added the bug Something isn't working label Nov 21, 2022
@smbea smbea added the ready Ready to be worked on label Nov 21, 2022
@smbea smbea self-assigned this Nov 21, 2022
@smbea
Copy link
Contributor Author

smbea commented Nov 21, 2022

Cause: This happens because the keyDown listeners were added to the search input when it is focused. Causing this to be lost when the search is not rendered

Possible solution: Attach listeners to menu itself and not search input

@smbea smbea added the in progress Currently worked on label Nov 21, 2022 — with bpmn-io-tasks
@smbea smbea removed the ready Ready to be worked on label Nov 21, 2022
@nikku
Copy link
Member

nikku commented Nov 21, 2022

Further root causing:

  • adding tab-index=-1 to the popup menu allows us to focus it programmatically
  • HOWEVER: Keyboard will always use the capture phase to intercept events; as a result we cannot hook in before it 🙈

Some work-in-progress fix for this is part of #706

@smbea
Copy link
Contributor Author

smbea commented Nov 22, 2022

We want to solve #707 before this, since it affects how this bug is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants