mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
safari fix for autofill totp and context menu options
This commit is contained in:
parent
6efcaaa584
commit
962bd24974
@ -86,6 +86,7 @@ export class CurrentController {
|
||||
cipher: cipher,
|
||||
pageDetails: this.pageDetails,
|
||||
fromBackground: false,
|
||||
doc: this.$window.document,
|
||||
}).then((totpCode: string) => {
|
||||
this.$analytics.eventTrack('Autofilled');
|
||||
if (totpCode && this.platformUtilsService.isFirefox()) {
|
||||
|
@ -54,7 +54,7 @@
|
||||
{{$ctrl.i18n.addLoginNotificationDesc}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-section">
|
||||
<div class="list-section" ng-if="showDisableContextMenu">
|
||||
<div class="list-section-items">
|
||||
<div class="list-section-item list-section-item-checkbox">
|
||||
<label for="context-menu">{{$ctrl.i18n.disableContextMenuItem}}</label>
|
||||
|
@ -17,6 +17,7 @@ export class OptionsController {
|
||||
disableAutoTotpCopy = false;
|
||||
disableContextMenuItem = false;
|
||||
disableAddLoginNotification = false;
|
||||
showDisableContextMenu = true;
|
||||
disableGa = false;
|
||||
i18n: any;
|
||||
|
||||
@ -25,6 +26,7 @@ export class OptionsController {
|
||||
private stateService: StateService, private storageService: StorageService,
|
||||
public messagingService: MessagingService, private $timeout: ng.ITimeoutService) {
|
||||
this.i18n = i18nService;
|
||||
this.showDisableContextMenu = !platformUtilsService.isSafari();
|
||||
|
||||
$timeout(() => {
|
||||
PopupUtilsService.initListSectionItemListeners(document, angular);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user