diff --git a/src/components/EmojiPicker/EmojiPickerMenu/index.js b/src/components/EmojiPicker/EmojiPickerMenu/index.js index cbf55b31c74d..d05a39160916 100755 --- a/src/components/EmojiPicker/EmojiPickerMenu/index.js +++ b/src/components/EmojiPicker/EmojiPickerMenu/index.js @@ -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]);