From efbed1a9a3a9212cadf2ccb7541b81152e5e9c44 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 19 Aug 2019 12:05:13 -0400 Subject: [PATCH] remove safari copy totp clipboard hack --- src/popup/vault/current-tab.component.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/popup/vault/current-tab.component.ts b/src/popup/vault/current-tab.component.ts index ed576bdf89..262c375d0b 100644 --- a/src/popup/vault/current-tab.component.ts +++ b/src/popup/vault/current-tab.component.ts @@ -149,7 +149,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy { doc: window.document, }); this.analytics.eventTrack.next({ action: 'Autofilled' }); - if (this.totpCode != null && !this.platformUtilsService.isSafari()) { + if (this.totpCode != null) { this.platformUtilsService.copyToClipboard(this.totpCode, { window: window }); } if (this.popupUtilsService.inPopup(window)) { @@ -162,15 +162,6 @@ export class CurrentTabComponent implements OnInit, OnDestroy { this.changeDetectorRef.detectChanges(); }); } - - // Weird bug in Safari won't allow clipboard copying after a promise call, so we have this workaround - if (cipher.type === CipherType.Login && this.platformUtilsService.isSafari()) { - this.totpTimeout = window.setTimeout(() => { - if (this.totpCode != null) { - this.platformUtilsService.copyToClipboard(this.totpCode, { window: window }); - } - }, 500); - } } searchVault() {