1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 15:23:33 +00:00

[PM-12303] fix password state spurious emissions (#11670)

* trace generation requests
* eliminate spurious save caused by validator changes
* fix emissions caused by setting bounds attrbutes
---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
✨ Audrey ✨
2024-10-23 14:23:28 -04:00
committed by GitHub
parent 7c79487f04
commit 22be52d2f3
11 changed files with 64 additions and 91 deletions

View File

@@ -376,7 +376,7 @@ export class CredentialGeneratorComponent implements OnInit, OnDestroy {
if (!a || a.onlyOnRequest) {
this.value$.next("-");
} else {
this.generate$.next();
this.generate("autogenerate");
}
});
});
@@ -472,7 +472,15 @@ export class CredentialGeneratorComponent implements OnInit, OnDestroy {
protected readonly userId$ = new BehaviorSubject<UserId>(null);
/** Emits when a new credential is requested */
protected readonly generate$ = new Subject<void>();
private readonly generate$ = new Subject<string>();
/** Request a new value from the generator
* @param requestor a label used to trace generation request
* origin in the debugger.
*/
protected generate(requestor: string) {
this.generate$.next(requestor);
}
private toOptions(algorithms: AlgorithmInfo[]) {
const options: Option<string>[] = algorithms.map((algorithm) => ({