Skip to content

Commit

Permalink
Merge pull request #32654 from dukenv0307/fix/30867
Browse files Browse the repository at this point in the history
Fix regression of keybord in emoji picker

(cherry picked from commit 12b6a77)
  • Loading branch information
rlinoz authored and OSBotify committed Dec 7, 2023
1 parent 5453f1a commit d64306c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/EmojiPicker/EmojiPickerMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,13 @@ function EmojiPickerMenu(props) {
// Enable keyboard movement if tab or enter is pressed or if shift is pressed while the input
// is not focused, so that the navigation and tab cycling can be done using the keyboard without
// interfering with the input behaviour.
if (!ReportUtils.shouldAutoFocusOnKeyPress(keyBoardEvent)) {
if (keyBoardEvent.key === 'Tab' || keyBoardEvent.key === 'Enter' || (keyBoardEvent.key === 'Shift' && searchInputRef.current && !searchInputRef.current.isFocused())) {
setIsUsingKeyboardMovement(true);
return;
}

// We allow typing in the search box if any key is pressed apart from Arrow keys.
if (searchInputRef.current && !searchInputRef.current.isFocused()) {
if (searchInputRef.current && !searchInputRef.current.isFocused() && ReportUtils.shouldAutoFocusOnKeyPress(keyBoardEvent)) {
searchInputRef.current.focus();
}
},
Expand Down

0 comments on commit d64306c

Please sign in to comment.