mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
manually focus search. only search on 2 characters
This commit is contained in:
parent
f783826c33
commit
152fc981a1
@ -65,7 +65,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
window.setTimeout(() => {
|
||||
if (!this.editMode) {
|
||||
if (this.cipher.name != null && this.cipher.name !== '') {
|
||||
document.getElementById('loginUsername').focus();
|
||||
|
@ -7,7 +7,7 @@
|
||||
</div>
|
||||
<div class="search">
|
||||
<input type="search" placeholder="{{'searchVault' | i18n}}" id="search"
|
||||
[(ngModel)]="searchText" (input)="searchVault()" appAutofocus>
|
||||
[(ngModel)]="searchText" (input)="searchVault()">
|
||||
<i class="fa fa-search"></i>
|
||||
</div>
|
||||
<div class="right">
|
||||
|
@ -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 } });
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user