Skip to content

Commit

Permalink
Autocomplete: Fix closing slash inserter with ESC (#23859)
Browse files Browse the repository at this point in the history
  • Loading branch information
noisysocks authored Jul 13, 2020
1 parent c2af546 commit 2eaee1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/components/src/autocomplete/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ export class Autocomplete extends Component {
break;

case ESCAPE:
this.setState( { autocompleter: null } );
this.setState( { autocompleter: null, AutocompleterUI: null } );
break;

case ENTER:
Expand All @@ -428,6 +428,7 @@ export class Autocomplete extends Component {
// Any handled keycode should prevent original behavior. This relies on
// the early return in the default case.
event.preventDefault();
event.stopPropagation();
}

componentDidUpdate( prevProps ) {
Expand Down

0 comments on commit 2eaee1c

Please sign in to comment.