From 04f687d6fcb39b59f79dc11e0e81fb0251eed49c Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 19 Apr 2018 08:04:00 -0400 Subject: [PATCH] pass window doc to copy function --- jslib | 2 +- src/popup/components/action-buttons.component.ts | 2 +- src/popup/generator/password-generator-history.component.ts | 2 +- src/popup/generator/password-generator.component.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jslib b/jslib index e20e878b8b8..23917010a77 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit e20e878b8b83b9eec33ceff6216e9c5e6885c8cd +Subproject commit 23917010a778e8464ba8b5f080d3306fc28a489e diff --git a/src/popup/components/action-buttons.component.ts b/src/popup/components/action-buttons.component.ts index 4593525d72d..a89b27d8c74 100644 --- a/src/popup/components/action-buttons.component.ts +++ b/src/popup/components/action-buttons.component.ts @@ -52,7 +52,7 @@ export class ActionButtonsComponent { } this.analytics.eventTrack.next({ action: 'Copied ' + aType }); - this.platformUtilsService.copyToClipboard(value); + this.platformUtilsService.copyToClipboard(value, { doc: window.document }); this.toasterService.popAsync('info', null, this.i18nService.t('valueCopied', this.i18nService.t(typeI18nKey))); } diff --git a/src/popup/generator/password-generator-history.component.ts b/src/popup/generator/password-generator-history.component.ts index eedcd159aaf..0d74c08720e 100644 --- a/src/popup/generator/password-generator-history.component.ts +++ b/src/popup/generator/password-generator-history.component.ts @@ -20,7 +20,7 @@ export class PasswordGeneratorHistoryComponent extends BasePasswordGeneratorHist constructor(passwordGenerationService: PasswordGenerationService, analytics: Angulartics2, platformUtilsService: PlatformUtilsService, i18nService: I18nService, toasterService: ToasterService, private location: Location) { - super(passwordGenerationService, analytics, platformUtilsService, i18nService, toasterService); + super(passwordGenerationService, analytics, platformUtilsService, i18nService, toasterService, window); } close() { diff --git a/src/popup/generator/password-generator.component.ts b/src/popup/generator/password-generator.component.ts index faf862213e5..431f0a30eed 100644 --- a/src/popup/generator/password-generator.component.ts +++ b/src/popup/generator/password-generator.component.ts @@ -27,7 +27,7 @@ export class PasswordGeneratorComponent extends BasePasswordGeneratorComponent { platformUtilsService: PlatformUtilsService, i18nService: I18nService, toasterService: ToasterService, private stateService: StateService, private router: Router, private location: Location) { - super(passwordGenerationService, analytics, platformUtilsService, i18nService, toasterService); + super(passwordGenerationService, analytics, platformUtilsService, i18nService, toasterService, window); } async ngOnInit() {