mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-28 17:27:50 +01:00
fix issue #1933
This commit is contained in:
parent
75c0680968
commit
1089c06d77
@ -54,7 +54,7 @@
|
||||
<div class="box-content">
|
||||
<div class="box-content-row box-content-row-input" appBoxRow>
|
||||
<label for="num-words">{{'numWords' | i18n}}</label>
|
||||
<input id="num-words" type="number" min="3" max="20" (blur)="saveOptions()"
|
||||
<input id="num-words" type="number" min="3" max="20" (change)="lengthInput()"
|
||||
[(ngModel)]="options.numWords">
|
||||
</div>
|
||||
<div class="box-content-row box-content-row-input" appBoxRow>
|
||||
@ -80,7 +80,7 @@
|
||||
<div class="box-content-row box-content-row-slider" appBoxRow>
|
||||
<label for="length">{{'length' | i18n}}</label>
|
||||
<input id="length" type="number" min="5" max="128" [(ngModel)]="options.length"
|
||||
(change)="lengthChanged()" (blur)="saveOptions()">
|
||||
(change)="lengthInput()">
|
||||
<input id="lengthRange" type="range" min="5" max="128" step="1" [(ngModel)]="options.length"
|
||||
(change)="sliderChanged()" (input)="sliderInput()">
|
||||
</div>
|
||||
|
@ -40,8 +40,11 @@ export class PasswordGeneratorComponent extends BasePasswordGeneratorComponent {
|
||||
this.close();
|
||||
}
|
||||
|
||||
lengthChanged() {
|
||||
document.getElementById('length').focus();
|
||||
async lengthInput() {
|
||||
var last = this.password;
|
||||
this.saveOptions();
|
||||
if(last != this.password)
|
||||
await this.passwordGenerationService.addHistory(this.password);
|
||||
}
|
||||
|
||||
close() {
|
||||
|
Loading…
Reference in New Issue
Block a user