diff --git a/src/popup/vault/add-edit.component.ts b/src/popup/vault/add-edit.component.ts
index 3282bd7128c..335fa0aef9d 100644
--- a/src/popup/vault/add-edit.component.ts
+++ b/src/popup/vault/add-edit.component.ts
@@ -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();
diff --git a/src/popup/vault/current-tab.component.html b/src/popup/vault/current-tab.component.html
index 490007ed55f..eab4a7fa0c8 100644
--- a/src/popup/vault/current-tab.component.html
+++ b/src/popup/vault/current-tab.component.html
@@ -7,7 +7,7 @@
+ [(ngModel)]="searchText" (input)="searchVault()">
diff --git a/src/popup/vault/current-tab.component.ts b/src/popup/vault/current-tab.component.ts
index 23f9728c82c..96de369df35 100644
--- a/src/popup/vault/current-tab.component.ts
+++ b/src/popup/vault/current-tab.component.ts
@@ -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 } });
}