diff --git a/src/Geosuggest.tsx b/src/Geosuggest.tsx index 417643c..ed27c13 100644 --- a/src/Geosuggest.tsx +++ b/src/Geosuggest.tsx @@ -219,6 +219,9 @@ export default class GeoSuggest extends React.Component { if (!this.state.ignoreBlur) { this.hideSuggests(); } + if (this.props.onBlur) { + this.props.onBlur(this.state.userInput); + } } onNext(): void { @@ -436,9 +439,6 @@ export default class GeoSuggest extends React.Component { * Hide the suggestions */ hideSuggests(): void { - if (this.props.onBlur) { - this.props.onBlur(this.state.userInput); - } this.timer = window.setTimeout(() => { this.setState({ activeSuggest: null,