From 1089c06d7774c15183278043eaca17d0fedbc146 Mon Sep 17 00:00:00 2001 From: Liu Junqi Date: Thu, 21 Oct 2021 14:19:30 +0800 Subject: [PATCH] fix issue #1933 --- src/popup/generator/password-generator.component.html | 4 ++-- src/popup/generator/password-generator.component.ts | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/popup/generator/password-generator.component.html b/src/popup/generator/password-generator.component.html index 6986210e94..f5a3602738 100644 --- a/src/popup/generator/password-generator.component.html +++ b/src/popup/generator/password-generator.component.html @@ -54,7 +54,7 @@
-
@@ -80,7 +80,7 @@
+ (change)="lengthInput()">
diff --git a/src/popup/generator/password-generator.component.ts b/src/popup/generator/password-generator.component.ts index 6fffda8b41..48ef21852c 100644 --- a/src/popup/generator/password-generator.component.ts +++ b/src/popup/generator/password-generator.component.ts @@ -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() {