Skip to content

Commit

Permalink
Merge pull request #28459 from dukenv0307/fix/28072
Browse files Browse the repository at this point in the history
Fix input lost focus when entering on no result found
  • Loading branch information
nkuoch authored Oct 4, 2023
2 parents a4efd74 + 4b8fc0a commit 33b17c4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/EmojiPicker/EmojiPickerMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ class EmojiPickerMenu extends Component {
onFocus={() => this.setState({isFocused: true, highlightedIndex: -1, isUsingKeyboardMovement: false})}
onBlur={() => this.setState({isFocused: false})}
autoCorrect={false}
blurOnSubmit={this.state.filteredEmojis.length > 0}
/>
</View>
{!isFiltered && (
Expand Down
1 change: 1 addition & 0 deletions src/components/EmojiPicker/EmojiPickerMenu/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ function EmojiPickerMenu({preferredLocale, onEmojiSelected, preferredSkinTone, t
accessibilityLabel={translate('common.search')}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
onChangeText={filterEmojis}
blurOnSubmit={filteredEmojis.length > 0}
/>
</View>
{!isFiltered && (
Expand Down
1 change: 1 addition & 0 deletions src/components/SelectionList/BaseSelectionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ function BaseSelectionList({
selectTextOnFocus
spellCheck={false}
onSubmitEditing={selectFocusedOption}
blurOnSubmit={Boolean(flattenedSections.allOptions.length)}
/>
</View>
)}
Expand Down

0 comments on commit 33b17c4

Please sign in to comment.