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:
@@ -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) => ({
|
||||
|
||||
Reference in New Issue
Block a user