Skip to content

Commit

Permalink
Do not add terms when tabbing away from the field. (#6622)
Browse files Browse the repository at this point in the history
Props @afercia
  • Loading branch information
afercia authored and Tammie Lister committed May 10, 2018
1 parent 41b59cc commit e0f8003
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions components/form-token-field/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class FormTokenField extends Component {

onBlur() {
if ( this.inputHasValidValue() ) {
this.setState( { isActive: false }, this.addCurrentToken );
this.setState( { isActive: false } );
} else {
this.setState( initialState );
}
Expand All @@ -107,9 +107,6 @@ class FormTokenField extends Component {
case 8: // backspace (delete to left)
preventDefault = this.handleDeleteKey( this.deleteTokenBeforeInput );
break;
case 9: // tab
preventDefault = this.addCurrentToken();
break;
case 13: // enter/return
preventDefault = this.addCurrentToken();
break;
Expand Down

0 comments on commit e0f8003

Please sign in to comment.