mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
manually focus search. only search on 2 characters
This commit is contained in:
@@ -65,7 +65,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
if (!this.editMode) {
|
if (!this.editMode) {
|
||||||
if (this.cipher.name != null && this.cipher.name !== '') {
|
if (this.cipher.name != null && this.cipher.name !== '') {
|
||||||
document.getElementById('loginUsername').focus();
|
document.getElementById('loginUsername').focus();
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<input type="search" placeholder="{{'searchVault' | i18n}}" id="search"
|
<input type="search" placeholder="{{'searchVault' | i18n}}" id="search"
|
||||||
[(ngModel)]="searchText" (input)="searchVault()" appAutofocus>
|
[(ngModel)]="searchText" (input)="searchVault()">
|
||||||
<i class="fa fa-search"></i>
|
<i class="fa fa-search"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
|
|||||||
@@ -100,6 +100,10 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
}, 5000);
|
}, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.setTimeout(() => {
|
||||||
|
document.getElementById('search').focus();
|
||||||
|
}, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
@@ -149,6 +153,9 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
searchVault() {
|
searchVault() {
|
||||||
|
if (this.searchText == null || this.searchText.length < 2) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.router.navigate(['/tabs/vault'], { queryParams: { searchText: this.searchText } });
|
this.router.navigate(['/tabs/vault'], { queryParams: { searchText: this.searchText } });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user