Skip to content

Commit

Permalink
Merge pull request #35796 from callstack-internal/fix/emoji-picker-ke…
Browse files Browse the repository at this point in the history
…yboard

fix: Focusing emoji search input on mWeb
  • Loading branch information
roryabraham authored Feb 5, 2024
2 parents 43d1576 + 82fa188 commit 301cb80
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 @@ -91,11 +91,11 @@ function EmojiPickerMenu({forwardedRef, onEmojiSelected}) {
}

// If the input is not focused and the new index is out of range, focus the input
if (newIndex < 0 && !searchInputRef.current.isFocused()) {
if (newIndex < 0 && !searchInputRef.current.isFocused() && shouldFocusInputOnScreenFocus) {
searchInputRef.current.focus();
}
},
[filteredEmojis.length, highlightFirstEmoji, isUsingKeyboardMovement],
[filteredEmojis.length, highlightFirstEmoji, isUsingKeyboardMovement, shouldFocusInputOnScreenFocus],
);

const disabledIndexes = useMemo(() => (isListFiltered ? [] : [...headerIndices, ...spacersIndexes]), [headerIndices, isListFiltered, spacersIndexes]);
Expand Down

0 comments on commit 301cb80

Please sign in to comment.