From af2292f80ccda695f8e87d2c752b841f60ff1df1 Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Mon, 13 Jul 2020 20:11:31 +1000 Subject: [PATCH] Autocomplete: Fix closing slash inserter with ESC (#23859) --- packages/components/src/autocomplete/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/components/src/autocomplete/index.js b/packages/components/src/autocomplete/index.js index 3c66e5f4d21cfd..38a5a0d58fd6bb 100644 --- a/packages/components/src/autocomplete/index.js +++ b/packages/components/src/autocomplete/index.js @@ -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: @@ -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 ) {