Merge pull request #4178 from GabrielInTheWorld/fix-autofocus-search

Fixes #4174
This commit is contained in:
Sean 2019-01-29 12:14:28 +01:00 committed by GitHub
commit c423f3a0a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -35,6 +35,7 @@
</button> </button>
<mat-form-field *ngIf="isSearchBar"> <mat-form-field *ngIf="isSearchBar">
<input <input
osAutofocus
matInput matInput
(keyup)="applySearch($event, $event.target.value)" (keyup)="applySearch($event, $event.target.value)"
placeholder="{{ translate.instant('Search') }}" placeholder="{{ translate.instant('Search') }}"

View File

@ -11,7 +11,7 @@
<div class="search-field"> <div class="search-field">
<form [formGroup]="quickSearchform"> <form [formGroup]="quickSearchform">
<mat-form-field> <mat-form-field>
<input matInput formControlName="query" (keyup)="quickSearch()" /> <input matInput osAutofocus formControlName="query" (keyup)="quickSearch()" />
<mat-icon matSuffix>search</mat-icon> <mat-icon matSuffix>search</mat-icon>
</mat-form-field> </mat-form-field>
</form> </form>