From bf9a9c5f9fb5933faeeb07a85f127373ebfe7284 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 17 Aug 2018 12:24:56 -0400 Subject: [PATCH] fix copy options --- src/angular/components/password-generator-history.component.ts | 2 +- src/angular/components/password-generator.component.ts | 2 +- src/angular/components/password-history.component.ts | 2 +- src/angular/components/view.component.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/angular/components/password-generator-history.component.ts b/src/angular/components/password-generator-history.component.ts index 015d64fcc0..45c1006992 100644 --- a/src/angular/components/password-generator-history.component.ts +++ b/src/angular/components/password-generator-history.component.ts @@ -27,7 +27,7 @@ export class PasswordGeneratorHistoryComponent implements OnInit { copy(password: string) { this.analytics.eventTrack.next({ action: 'Copied Historical Password' }); - const copyOptions = this.win != null ? { doc: this.win.document } : null; + const copyOptions = this.win != null ? { window: this.win } : null; this.platformUtilsService.copyToClipboard(password, copyOptions); this.toasterService.popAsync('info', null, this.i18nService.t('valueCopied', this.i18nService.t('password'))); } diff --git a/src/angular/components/password-generator.component.ts b/src/angular/components/password-generator.component.ts index 0a1608dbb0..c6cd72fb6d 100644 --- a/src/angular/components/password-generator.component.ts +++ b/src/angular/components/password-generator.component.ts @@ -61,7 +61,7 @@ export class PasswordGeneratorComponent implements OnInit { copy() { this.analytics.eventTrack.next({ action: 'Copied Generated Password' }); - const copyOptions = this.win != null ? { doc: this.win.document } : null; + const copyOptions = this.win != null ? { window: this.win } : null; this.platformUtilsService.copyToClipboard(this.password, copyOptions); this.toasterService.popAsync('info', null, this.i18nService.t('valueCopied', this.i18nService.t('password'))); } diff --git a/src/angular/components/password-history.component.ts b/src/angular/components/password-history.component.ts index 350dc6ed78..b847f9ea33 100644 --- a/src/angular/components/password-history.component.ts +++ b/src/angular/components/password-history.component.ts @@ -25,7 +25,7 @@ export class PasswordHistoryComponent implements OnInit { copy(password: string) { this.analytics.eventTrack.next({ action: 'Copied Password History' }); - const copyOptions = this.win != null ? { doc: this.win.document } : null; + const copyOptions = this.win != null ? { window: this.win } : null; this.platformUtilsService.copyToClipboard(password, copyOptions); this.toasterService.popAsync('info', null, this.i18nService.t('valueCopied', this.i18nService.t('password'))); } diff --git a/src/angular/components/view.component.ts b/src/angular/components/view.component.ts index b05fd6a76d..33403710bf 100644 --- a/src/angular/components/view.component.ts +++ b/src/angular/components/view.component.ts @@ -122,7 +122,7 @@ export class ViewComponent implements OnDestroy { } this.analytics.eventTrack.next({ action: 'Copied ' + aType }); - const copyOptions = this.win != null ? { doc: this.win.document } : null; + const copyOptions = this.win != null ? { window: this.win } : null; this.platformUtilsService.copyToClipboard(value, copyOptions); this.toasterService.popAsync('info', null, this.i18nService.t('valueCopied', this.i18nService.t(typeI18nKey)));