1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 18:23:31 +00:00

manually focus search. only search on 2 characters

This commit is contained in:
Kyle Spearrin
2018-04-18 15:49:03 -04:00
parent f783826c33
commit 152fc981a1
3 changed files with 9 additions and 2 deletions

View File

@@ -100,6 +100,10 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
}
}, 5000);
}
window.setTimeout(() => {
document.getElementById('search').focus();
}, 200);
}
ngOnDestroy() {
@@ -149,6 +153,9 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
}
searchVault() {
if (this.searchText == null || this.searchText.length < 2) {
return;
}
this.router.navigate(['/tabs/vault'], { queryParams: { searchText: this.searchText } });
}