mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
[PS-94] Ensure autofill always uses the same tab (#3066)
* Require specifying a tab in doAutoFill options to ensure only the desired tab is filled * Specify well defined type for added tab properties * Replace new tabToAutoFill property with parameter
This commit is contained in:
@@ -143,7 +143,7 @@ export default class RuntimeBackground {
|
||||
tab: msg.tab,
|
||||
details: msg.details,
|
||||
});
|
||||
this.autofillTimeout = setTimeout(async () => await this.autofillPage(), 300);
|
||||
this.autofillTimeout = setTimeout(async () => await this.autofillPage(msg.tab), 300);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -205,8 +205,9 @@ export default class RuntimeBackground {
|
||||
}
|
||||
}
|
||||
|
||||
private async autofillPage() {
|
||||
private async autofillPage(tabToAutoFill: chrome.tabs.Tab) {
|
||||
const totpCode = await this.autofillService.doAutoFill({
|
||||
tab: tabToAutoFill,
|
||||
cipher: this.main.loginToAutoFill,
|
||||
pageDetails: this.pageDetailsToAutoFill,
|
||||
fillNewPassword: true,
|
||||
|
||||
Reference in New Issue
Block a user