mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 06:43:35 +00:00
focus on init timeout
This commit is contained in:
@@ -24,12 +24,6 @@ export class CurrentController {
|
|||||||
this.inSidebar = utilsService.inSidebar($window);
|
this.inSidebar = utilsService.inSidebar($window);
|
||||||
this.disableSearch = utilsService.isEdge();
|
this.disableSearch = utilsService.isEdge();
|
||||||
|
|
||||||
$scope.$on('$viewContentLoaded', function () {
|
|
||||||
$timeout(function () {
|
|
||||||
document.getElementById('search').focus();
|
|
||||||
}, 50);
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.$on('syncCompleted', (event: any, successfully: boolean) => {
|
$scope.$on('syncCompleted', (event: any, successfully: boolean) => {
|
||||||
if (this.loaded) {
|
if (this.loaded) {
|
||||||
$timeout(this.loadVault.bind(this), 500);
|
$timeout(this.loadVault.bind(this), 500);
|
||||||
@@ -42,6 +36,10 @@ export class CurrentController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$onInit() {
|
$onInit() {
|
||||||
|
this.$timeout(function () {
|
||||||
|
document.getElementById('search').focus();
|
||||||
|
}, 50);
|
||||||
|
|
||||||
this.loadVault();
|
this.loadVault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user