Skip to content

Commit

Permalink
Remove useless additionnal blur call (#22156)
Browse files Browse the repository at this point in the history
Summary:
I noticed that the _onBlur method was not exactly similar to the _onFocus one in the TextInput component.

After digging, I found that the blurTextInput method in the TextInputState.js file was call twice in a raw instead of once when the textinput component should blur.

By removing this line, I fix this unecessary multiple call.
Pull Request resolved: #22156

Reviewed By: TheSavior

Differential Revision: D13105396

Pulled By: RSNara

fbshipit-source-id: 8e83461d8b288d8ee4047bc4a33c4480e193c349
  • Loading branch information
gazoudoudou authored and facebook-github-bot committed Nov 20, 2018
1 parent 55994f5 commit 27cfba2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion Libraries/Components/TextInput/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,6 @@ const TextInput = createReactClass({
},

_onBlur: function(event: Event) {
this.blur();
if (this.props.onBlur) {
this.props.onBlur(event);
}
Expand Down

0 comments on commit 27cfba2

Please sign in to comment.