1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

only use clipboard.writeText on firefox

This commit is contained in:
Kyle Spearrin 2018-08-20 09:18:33 -04:00
parent 06eaa08ff2
commit fc2b38b8d9
2 changed files with 2 additions and 2 deletions

2
jslib

@ -1 +1 @@
Subproject commit bf9a9c5f9fb5933faeeb07a85f127373ebfe7284
Subproject commit b64757132faf1ebb5438bec00720c58604fd29f6

View File

@ -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.