focus length input on change

This commit is contained in:
Kyle Spearrin 2019-04-15 22:37:29 -04:00
parent 18c89e4fa5
commit a29e9e11f7
3 changed files with 6 additions and 2 deletions

2
jslib

@ -1 +1 @@
Subproject commit 0b0245b90fbb99fe677a94a2f97b8245cd255c1f
Subproject commit d3a2dfe2e8ea27662aaf189e155d81681ced0d8e

View File

@ -35,7 +35,7 @@
<div class="form-group col-4">
<label for="length">{{'length' | i18n}}</label>
<input id="length" class="form-control" type="number" min="5" max="128" [(ngModel)]="options.length"
(blur)="saveOptions()">
(blur)="saveOptions()" (change)="lengthChanged()">
</div>
<div class="form-group col-4">
<label for="min-number">{{'minNumbers' | i18n}}</label>

View File

@ -43,4 +43,8 @@ export class PasswordGeneratorComponent extends BasePasswordGeneratorComponent {
this.modal = null;
});
}
lengthChanged() {
document.getElementById('length').focus();
}
}