[PM-5839] [PM-5847] Set Bitwarden as Browser Default Autofill Bug Fixes (#8007)

This commit is contained in:
Cesar Gonzalez 2024-02-21 12:44:44 -06:00 committed by GitHub
parent ba4e59783b
commit 91cc837be9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 10 deletions

View File

@ -2974,10 +2974,6 @@
"message": "Ignoring this option may cause conflicts between the Bitwarden auto-fill menu and your browser's.",
"description": "Dialog message facilitating the ability to override a chrome browser's default autofill behavior"
},
"overrideDefaultBrowserAutofillPrivacyRequiredDescription": {
"message": "This action will restart the Bitwarden extension. Ignoring this option may cause conflicts between the Bitwarden auto-fill menu and your browser's.",
"description": "Dialog message facilitating the ability to override a chrome browser's default autofill behavior"
},
"overrideDefaultBrowserAutoFillSettings": {
"message": "Make Bitwarden your default password manager",
"description": "Label for the setting that allows overriding the default browser autofill settings"

View File

@ -210,13 +210,9 @@ export class AutofillComponent implements OnInit {
return;
}
const permissionGranted = await this.privacyPermissionGranted();
const contentKey = permissionGranted
? "overrideDefaultBrowserAutofillDescription"
: "overrideDefaultBrowserAutofillPrivacyRequiredDescription";
await this.dialogService.openSimpleDialog({
title: { key: "overrideDefaultBrowserAutofillTitle" },
content: { key: contentKey },
content: { key: "overrideDefaultBrowserAutofillDescription" },
acceptButtonText: { key: "makeDefault" },
acceptAction: async () => await this.handleOverrideDialogAccept(),
cancelButtonText: { key: "ignore" },

View File

@ -87,7 +87,9 @@ export class NativeMessagingBackground {
if (chrome?.permissions?.onAdded) {
// Reload extension to activate nativeMessaging
chrome.permissions.onAdded.addListener((permissions) => {
BrowserApi.reloadExtension(null);
if (permissions.permissions?.includes("nativeMessaging")) {
BrowserApi.reloadExtension(null);
}
});
}
}