]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/header/search-typeahead.component.ts
Add control bar option for peertube player
[github/Chocobozzz/PeerTube.git] / client / src / app / header / search-typeahead.component.ts
index b5d76c70e1143ff45d7369bd9c445ec8783460f1..0794ec8f4774e7f3d71b70cf1bd7d593927b2786 100644 (file)
@@ -152,7 +152,7 @@ export class SearchTypeaheadComponent implements OnInit, AfterViewChecked, OnDes
     }
   }
 
-  onSuggestionlicked (payload: SuggestionPayload) {
+  onSuggestionClicked (payload: SuggestionPayload) {
     this.doSearch(this.buildSearchTarget(payload))
   }
 
@@ -170,6 +170,11 @@ export class SearchTypeaheadComponent implements OnInit, AfterViewChecked, OnDes
 
         this.keyboardEventsManager.onKeydown(event)
         break
+
+      case 'Enter':
+        event.stopPropagation()
+        this.doSearch()
+        break
     }
   }
 
@@ -199,7 +204,7 @@ export class SearchTypeaheadComponent implements OnInit, AfterViewChecked, OnDes
   }
 
   private loadUserLanguagesIfNeeded (queryParams: any) {
-    if (queryParams && queryParams.languageOneOf) return of(queryParams)
+    if (queryParams?.languageOneOf) return of(queryParams)
 
     return this.authService.userInformationLoaded
                .pipe(