aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-03 16:04:56 +0100
committerChocobozzz <me@florianbigard.com>2021-12-03 16:04:56 +0100
commitd1a233d8d86ead1e3aa2350d5480eab3336b17d6 (patch)
treee3623b1726356e9f3cc8d78f3617e78f089ed89c /client
parent9ea02c48a7a47b5bbed261e847d7d671e266a073 (diff)
parent5bd427e01c89e178ceaba357ab1f392553c259bb (diff)
downloadPeerTube-d1a233d8d86ead1e3aa2350d5480eab3336b17d6.tar.gz
PeerTube-d1a233d8d86ead1e3aa2350d5480eab3336b17d6.tar.zst
PeerTube-d1a233d8d86ead1e3aa2350d5480eab3336b17d6.zip
Merge branch 'release/4.0.0' into develop
Diffstat (limited to 'client')
-rw-r--r--client/src/app/header/search-typeahead.component.html6
-rw-r--r--client/src/app/header/search-typeahead.component.ts7
2 files changed, 9 insertions, 4 deletions
diff --git a/client/src/app/header/search-typeahead.component.html b/client/src/app/header/search-typeahead.component.html
index 0ced249a7..9b21d3f86 100644
--- a/client/src/app/header/search-typeahead.component.html
+++ b/client/src/app/header/search-typeahead.component.html
@@ -1,7 +1,7 @@
1<div class="d-inline-flex position-relative" id="typeahead-container"> 1<div class="d-inline-flex position-relative" id="typeahead-container">
2 <input 2 <input
3 type="text" id="search-video" name="search-video" #searchVideo i18n-placeholder placeholder="Search videos, playlists, channels…" 3 type="search" id="search-video" name="search-video" #searchVideo i18n-placeholder placeholder="Search videos, playlists, channels…"
4 [(ngModel)]="search" (ngModelChange)="onSearchChange()" (keydown)="handleKey($event)" (keydown.enter)="doSearch()" 4 [(ngModel)]="search" (ngModelChange)="onSearchChange()" (keydown)="handleKey($event)"
5 aria-label="Search" autocomplete="off" 5 aria-label="Search" autocomplete="off"
6 > 6 >
7 <my-global-icon 7 <my-global-icon
@@ -14,7 +14,7 @@
14 <ul [hidden]="!search || !areSuggestionsOpened" role="listbox" class="p-0 m-0"> 14 <ul [hidden]="!search || !areSuggestionsOpened" role="listbox" class="p-0 m-0">
15 <li 15 <li
16 *ngFor="let result of results; let i = index" class="suggestion d-flex flex-justify-start flex-items-center p-0 f5" 16 *ngFor="let result of results; let i = index" class="suggestion d-flex flex-justify-start flex-items-center p-0 f5"
17 role="option" aria-selected="true" (mouseenter)="onSuggestionHover(i)" (click)="onSuggestionlicked(result)" 17 role="option" aria-selected="true" (mouseenter)="onSuggestionHover(i)" (click)="onSuggestionClicked(result)"
18 > 18 >
19 <my-suggestion [result]="result" [highlight]="search"></my-suggestion> 19 <my-suggestion [result]="result" [highlight]="search"></my-suggestion>
20 </li> 20 </li>
diff --git a/client/src/app/header/search-typeahead.component.ts b/client/src/app/header/search-typeahead.component.ts
index e10baea2b..0794ec8f4 100644
--- a/client/src/app/header/search-typeahead.component.ts
+++ b/client/src/app/header/search-typeahead.component.ts
@@ -152,7 +152,7 @@ export class SearchTypeaheadComponent implements OnInit, AfterViewChecked, OnDes
152 } 152 }
153 } 153 }
154 154
155 onSuggestionlicked (payload: SuggestionPayload) { 155 onSuggestionClicked (payload: SuggestionPayload) {
156 this.doSearch(this.buildSearchTarget(payload)) 156 this.doSearch(this.buildSearchTarget(payload))
157 } 157 }
158 158
@@ -170,6 +170,11 @@ export class SearchTypeaheadComponent implements OnInit, AfterViewChecked, OnDes
170 170
171 this.keyboardEventsManager.onKeydown(event) 171 this.keyboardEventsManager.onKeydown(event)
172 break 172 break
173
174 case 'Enter':
175 event.stopPropagation()
176 this.doSearch()
177 break
173 } 178 }
174 } 179 }
175 180