1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

safari fix for autofill totp and context menu options

This commit is contained in:
Kyle Spearrin
2018-01-15 23:28:07 -05:00
parent 6efcaaa584
commit 962bd24974
4 changed files with 7 additions and 2 deletions

View File

@@ -172,6 +172,7 @@ export default class AutofillService implements AutofillServiceInterface {
this.cipherService.updateLastUsedDate(options.cipher.id);
}
console.log('fill');
BrowserApi.tabSendMessage(tab, {
command: 'fillForm',
fillScript: fillScript,
@@ -180,6 +181,7 @@ export default class AutofillService implements AutofillServiceInterface {
if (options.cipher.type !== CipherType.Login || totpPromise ||
(options.fromBackground && this.platformUtilsService.isFirefox()) || options.skipTotp ||
!options.cipher.login.totp || !this.tokenService.getPremium()) {
console.log('return early');
return;
}
@@ -191,7 +193,7 @@ export default class AutofillService implements AutofillServiceInterface {
return null;
}).then((code: string) => {
if (code) {
UtilsService.copyToClipboard(code);
UtilsService.copyToClipboard(code, options.doc);
}
return code;