diff --git a/ui/src/app/shared/autocomplete/autocomplete.component.ts b/ui/src/app/shared/autocomplete/autocomplete.component.ts index 86a2b4e33..079b6a3a3 100644 --- a/ui/src/app/shared/autocomplete/autocomplete.component.ts +++ b/ui/src/app/shared/autocomplete/autocomplete.component.ts @@ -285,9 +285,9 @@ export class AutoCompleteComponent implements OnInit, OnDestroy, OnChanges, Afte } handleSpace(event: KeyboardEvent): void { - event.preventDefault(); const focusIsOnOption = this.state.currentState.focused !== -1; if (focusIsOnOption) { + event.preventDefault(); this.handleOptionClick(this.state.currentState.focused); } }