Browse Source

focus length input on change

pull/384/head
Kyle Spearrin 7 years ago
parent
commit
a29e9e11f7
  1. 2
      jslib
  2. 2
      src/app/tools/password-generator.component.html
  3. 4
      src/app/tools/password-generator.component.ts

2
jslib

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

2
src/app/tools/password-generator.component.html

@ -35,7 +35,7 @@ @@ -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>

4
src/app/tools/password-generator.component.ts

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

Loading…
Cancel
Save