Skip to content

Commit 8567c3f

Browse files
committed
Resign first responder on searchbar blur
1 parent 286159b commit 8567c3f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
8181
- Fixed an issue where StoPrint jobs failed to release properly (#3730)
8282
- Fixed StoPrint login issue (#3732)
8383
- Fixed a crash that prevented all Android tab views from loading
84+
- Fixed the iOS keyboard not dismissing when returning from a detail view of a searchbar
8485

8586
### Removed
8687
- Removed the `prepare` script patching `ScrollEnabled` inside `RCTMultilineTextInputView` (#3337)

modules/searchbar/searchbar-ios.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,18 @@ export class SearchBar extends React.Component<Props> {
3434
this._ref = ref
3535
}
3636

37+
onHandleBlur = () => {
38+
this._ref && this._ref.unFocus()
39+
}
40+
3741
render() {
3842
return (
3943
<NativeSearchBar
4044
ref={this.handleRef}
4145
autoCorrect={false}
4246
hideBackground={true}
4347
onCancelButtonPress={this.props.onCancel}
48+
onBlur={this.onHandleBlur}
4449
onChangeText={this.props.onChange}
4550
onFocus={this.props.onFocus}
4651
onSearchButtonPress={this.handleSearchButtonPress}

0 commit comments

Comments
 (0)