1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

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

Submodule jslib updated: e20e878b8b...23917010a7

View File

@@ -52,7 +52,7 @@ export class ActionButtonsComponent {
} }
this.analytics.eventTrack.next({ action: 'Copied ' + aType }); this.analytics.eventTrack.next({ action: 'Copied ' + aType });
this.platformUtilsService.copyToClipboard(value); this.platformUtilsService.copyToClipboard(value, { doc: window.document });
this.toasterService.popAsync('info', null, this.toasterService.popAsync('info', null,
this.i18nService.t('valueCopied', this.i18nService.t(typeI18nKey))); this.i18nService.t('valueCopied', this.i18nService.t(typeI18nKey)));
} }

View File

@@ -20,7 +20,7 @@ export class PasswordGeneratorHistoryComponent extends BasePasswordGeneratorHist
constructor(passwordGenerationService: PasswordGenerationService, analytics: Angulartics2, constructor(passwordGenerationService: PasswordGenerationService, analytics: Angulartics2,
platformUtilsService: PlatformUtilsService, i18nService: I18nService, platformUtilsService: PlatformUtilsService, i18nService: I18nService,
toasterService: ToasterService, private location: Location) { toasterService: ToasterService, private location: Location) {
super(passwordGenerationService, analytics, platformUtilsService, i18nService, toasterService); super(passwordGenerationService, analytics, platformUtilsService, i18nService, toasterService, window);
} }
close() { close() {

View File

@@ -27,7 +27,7 @@ export class PasswordGeneratorComponent extends BasePasswordGeneratorComponent {
platformUtilsService: PlatformUtilsService, i18nService: I18nService, platformUtilsService: PlatformUtilsService, i18nService: I18nService,
toasterService: ToasterService, private stateService: StateService, toasterService: ToasterService, private stateService: StateService,
private router: Router, private location: Location) { private router: Router, private location: Location) {
super(passwordGenerationService, analytics, platformUtilsService, i18nService, toasterService); super(passwordGenerationService, analytics, platformUtilsService, i18nService, toasterService, window);
} }
async ngOnInit() { async ngOnInit() {