pass window doc to copy function

This commit is contained in:
Kyle Spearrin 2018-04-19 08:04:00 -04:00
parent 0ddc4c2d41
commit 04f687d6fc
4 changed files with 4 additions and 4 deletions

2
jslib

@ -1 +1 @@
Subproject commit e20e878b8b83b9eec33ceff6216e9c5e6885c8cd
Subproject commit 23917010a778e8464ba8b5f080d3306fc28a489e

View File

@ -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)));
}

View File

@ -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() {

View File

@ -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() {