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 kelset committed Nov 26, 2018
1 parent 87c9d92 commit 356ac5d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion Libraries/Components/TextInput/TextInput.js
Expand Up @@ -1184,7 +1184,6 @@ const TextInput = createReactClass({
},

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

2 comments on commit 356ac5d

@pvinis
Copy link
Contributor

@pvinis pvinis commented on 356ac5d Nov 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why revert this? was there a problem?

@kelset
Copy link
Collaborator

@kelset kelset commented on 356ac5d Nov 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes -> #22425

Please sign in to comment.