mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
Update last used index when auto-fill worked correctly (#1425)
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: f30d6f8027...e371d737b0
@@ -234,7 +234,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
|||||||
cipher = await this.cipherService.getLastUsedForUrl(tab.url);
|
cipher = await this.cipherService.getLastUsedForUrl(tab.url);
|
||||||
}
|
}
|
||||||
|
|
||||||
return await this.doAutoFill({
|
const autoFillResponse = await this.doAutoFill({
|
||||||
cipher: cipher,
|
cipher: cipher,
|
||||||
pageDetails: pageDetails,
|
pageDetails: pageDetails,
|
||||||
skipTotp: !fromCommand,
|
skipTotp: !fromCommand,
|
||||||
@@ -244,6 +244,13 @@ export default class AutofillService implements AutofillServiceInterface {
|
|||||||
onlyVisibleFields: !fromCommand,
|
onlyVisibleFields: !fromCommand,
|
||||||
fillNewPassword: fromCommand,
|
fillNewPassword: fromCommand,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Only update last used index if doAutoFill didn't throw an exception
|
||||||
|
if (fromCommand) {
|
||||||
|
this.cipherService.updateLastUsedIndexForUrl(tab.url);
|
||||||
|
}
|
||||||
|
|
||||||
|
return autoFillResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helpers
|
// Helpers
|
||||||
|
|||||||
Reference in New Issue
Block a user