From fc2b38b8d9497da7488034bb4c4299c46408755d Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 20 Aug 2018 09:18:33 -0400 Subject: [PATCH] only use clipboard.writeText on firefox --- jslib | 2 +- src/services/browserPlatformUtils.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jslib b/jslib index bf9a9c5f9fb..b64757132fa 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit bf9a9c5f9fb5933faeeb07a85f127373ebfe7284 +Subproject commit b64757132faf1ebb5438bec00720c58604fd29f6 diff --git a/src/services/browserPlatformUtils.service.ts b/src/services/browserPlatformUtils.service.ts index bee22038ac8..b4d6f479463 100644 --- a/src/services/browserPlatformUtils.service.ts +++ b/src/services/browserPlatformUtils.service.ts @@ -214,7 +214,7 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService } else if (options && options.doc) { doc = options.doc; } - if ((win as any).navigator.clipboard && (win as any).navigator.clipboard.writeText) { + if (this.isFirefox() && (win as any).navigator.clipboard && (win as any).navigator.clipboard.writeText) { (win as any).navigator.clipboard.writeText(text); } else if ((win as any).clipboardData && (win as any).clipboardData.setData) { // IE specific code path to prevent textarea being shown while dialog is visible.