focus vault search on `$viewContentLoaded`
This commit is contained in:
parent
16892239fb
commit
01ffc68fc2
|
@ -47,11 +47,11 @@
|
||||||
|
|
||||||
$q.all([collectionPromise, cipherPromise]).then(function () {
|
$q.all([collectionPromise, cipherPromise]).then(function () {
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
|
$("#search").focus();
|
||||||
|
|
||||||
if ($state.params.search) {
|
if ($state.params.search) {
|
||||||
$uibModalStack.dismissAll();
|
$uibModalStack.dismissAll();
|
||||||
$scope.$emit('setSearchVaultText', $state.params.search);
|
$scope.$emit('setSearchVaultText', $state.params.search);
|
||||||
$('#search').focus();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($state.params.viewEvents) {
|
if ($state.params.viewEvents) {
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.$on('$viewContentLoaded', function () {
|
$scope.$on('$viewContentLoaded', function () {
|
||||||
|
$("#search").focus();
|
||||||
|
|
||||||
if ($rootScope.vaultGroupings && $rootScope.vaultCiphers) {
|
if ($rootScope.vaultGroupings && $rootScope.vaultCiphers) {
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
loadGroupingData($rootScope.vaultGroupings);
|
loadGroupingData($rootScope.vaultGroupings);
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<label for="search" class="sr-only">Search</label>
|
<label for="search" class="sr-only">Search</label>
|
||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<input type="text" id="search" class="form-control" placeholder="Search my vault..."
|
<input type="text" id="search" class="form-control" placeholder="Search my vault..."
|
||||||
ng-focus="searchVault()" ng-model="main.searchVaultText" autofocus />
|
ng-focus="searchVault()" ng-model="main.searchVaultText" />
|
||||||
<span class="fa fa-search form-control-feedback" aria-hidden="true"></span>
|
<span class="fa fa-search form-control-feedback" aria-hidden="true"></span>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in New Issue