fix(boxai-sidebar): Arrow Key Navigation on Suggested Questions#3865
Merged
mergify[bot] merged 3 commits intobox:masterfrom Jan 30, 2025
Merged
fix(boxai-sidebar): Arrow Key Navigation on Suggested Questions#3865mergify[bot] merged 3 commits intobox:masterfrom
mergify[bot] merged 3 commits intobox:masterfrom
Conversation
Collaborator
jankowiakdawid
left a comment
There was a problem hiding this comment.
Shouldn't that be a fix(boxai-sidebar)?
Comment on lines
+97
to
+107
| const handleKeyPress = React.useCallback((event: KeyboardEvent) => { | ||
| if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(event.key)) { | ||
| event.stopPropagation(); | ||
| } | ||
| }, []); |
Collaborator
There was a problem hiding this comment.
We should add a storybook interactive test for this.
Collaborator
Author
There was a problem hiding this comment.
Sure, will do!
924c0ce to
b838924
Compare
| } | ||
|
|
||
| const handleKeyPress = React.useCallback((event: KeyboardEvent) => { | ||
| if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') { |
Collaborator
There was a problem hiding this comment.
What about Down and Up arrows?
Collaborator
Author
There was a problem hiding this comment.
Bug appears only for Left and Right arrow keys, for the Arrow Up/Down it's not being propagated further
2a947d6 to
5a69aec
Compare
kkuliczkowski-box
previously approved these changes
Jan 30, 2025
5a69aec to
7c74dfb
Compare
kkuliczkowski-box
approved these changes
Jan 30, 2025
jankowiakdawid
approved these changes
Jan 30, 2025
7c74dfb to
40939fe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Using the up and down arrow keys for keyboard navigation while focused on suggested questions also changes the document page.
Steps to Reproduce:
To prevent this behavior callback with
stopPropagation()was providedRecording
Screen.Recording.2025-01-24.at.17.08.31.mov