1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 05:43:41 +00:00

Navigate the user from the autofill nudge to the proper destination based on their browser (#15876)

This commit is contained in:
Nick Krantz
2025-08-11 09:44:51 -05:00
committed by GitHub
parent a9b934a7ac
commit 3c5fcfc7ef
2 changed files with 13 additions and 1 deletions

View File

@@ -12,7 +12,7 @@
[subtitle]="'autofillSpotlightDesc' | i18n"
[buttonText]="spotlightButtonText"
(onDismiss)="dismissSpotlight()"
(onButtonClick)="openURI($event, disablePasswordManagerURI)"
(onButtonClick)="disableBrowserAutofillSettingsFromNudge($event)"
[buttonIcon]="spotlightButtonIcon"
></bit-spotlight>
</div>

View File

@@ -585,4 +585,16 @@ export class AutofillComponent implements OnInit {
}
return hints;
}
/** Navigates the user from the Autofill Nudge to the proper destination based on their browser. */
async disableBrowserAutofillSettingsFromNudge(event: Event) {
// When we can programmatically disable the autofill setting, do that first
// otherwise open the appropriate URI for the browser
if (this.canOverrideBrowserAutofillSetting) {
this.defaultBrowserAutofillDisabled = true;
await this.updateDefaultBrowserAutofillDisabled();
} else {
await this.openURI(event, this.disablePasswordManagerURI);
}
}
}