From 9d063a92f0a085a53c5b9c293cc63653d09c9306 Mon Sep 17 00:00:00 2001 From: Stefan Hauke Date: Wed, 30 Nov 2022 10:38:36 +0100 Subject: [PATCH] fix: error when submitting consecutive search after submitting search from search suggestion (#1332) --- .../shared/components/search/search-box/search-box.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/shared/components/search/search-box/search-box.component.ts b/src/app/shared/components/search/search-box/search-box.component.ts index ddd836fab0..3d232e48fa 100644 --- a/src/app/shared/components/search/search-box/search-box.component.ts +++ b/src/app/shared/components/search/search-box/search-box.component.ts @@ -87,6 +87,7 @@ export class SearchBoxComponent implements OnInit, OnDestroy { // something was selected via keyboard this.searchResults$.pipe(take(1), takeUntil(this.destroy$)).subscribe(results => { this.router.navigate(['/search', results[this.activeIndex].term]); + this.activeIndex = -1; }); } else { this.router.navigate(['/search', suggestedTerm]);