From: Rigel Kent Date: Tue, 7 Apr 2020 00:20:24 +0000 (+0200) Subject: Fix search after first type on input X-Git-Tag: v2.2.0-rc.1~273 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=be6343d26ec07fd792de069229bd3be27e72d129;p=oweals%2Fpeertube.git Fix search after first type on input --- diff --git a/client/src/app/header/search-typeahead.component.html b/client/src/app/header/search-typeahead.component.html index 46b28ed48..710268664 100644 --- a/client/src/app/header/search-typeahead.component.html +++ b/client/src/app/header/search-typeahead.component.html @@ -1,7 +1,7 @@
diff --git a/client/src/app/header/search-typeahead.component.ts b/client/src/app/header/search-typeahead.component.ts index 396a875c8..d0350368d 100644 --- a/client/src/app/header/search-typeahead.component.ts +++ b/client/src/app/header/search-typeahead.component.ts @@ -134,7 +134,7 @@ export class SearchTypeaheadComponent implements OnInit, OnDestroy { ) } - handleKeyUp (event: KeyboardEvent) { + handleKey (event: KeyboardEvent) { event.stopImmediatePropagation() if (!this.keyboardEventsManager) return @@ -143,14 +143,11 @@ export class SearchTypeaheadComponent implements OnInit, OnDestroy { case 'ArrowUp': this.keyboardEventsManager.onKeydown(event) break - case 'Enter': - this.newSearch = false - this.doSearch() - break } } doSearch () { + this.newSearch = false const queryParams: Params = {} if (window.location.pathname === '/search' && this.route.snapshot.queryParams) {