mirror of
https://github.com/bitwarden/clients.git
synced 2026-06-28 21:01:38 +08:00
fix processMutations debouncing (#18615)
This commit is contained in:
parent
f7a5ad712f
commit
62f5929ebb
@ -54,6 +54,7 @@ export class CollectAutofillContentService implements CollectAutofillContentServ
|
||||
private ownedExperienceTagNames: string[] = [];
|
||||
private readonly updateAfterMutationTimeout = 1000;
|
||||
private readonly formFieldQueryString;
|
||||
private readonly debouncedProcessMutations = debounce(() => this.processMutations(), 100);
|
||||
private readonly nonInputFormFieldTags = new Set(["textarea", "select"]);
|
||||
private readonly ignoredInputTypes = new Set([
|
||||
"hidden",
|
||||
@ -986,7 +987,7 @@ export class CollectAutofillContentService implements CollectAutofillContentServ
|
||||
}
|
||||
|
||||
if (!this.mutationsQueue.length) {
|
||||
requestIdleCallbackPolyfill(debounce(this.processMutations, 100), { timeout: 500 });
|
||||
requestIdleCallbackPolyfill(this.debouncedProcessMutations, { timeout: 500 });
|
||||
}
|
||||
this.mutationsQueue.push(mutations);
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user