mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
dont use clipboard writeText api
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: bf9a9c5f9f...b64757132f
@@ -216,9 +216,7 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
|
|||||||
} else if (options && options.doc) {
|
} else if (options && options.doc) {
|
||||||
doc = options.doc;
|
doc = options.doc;
|
||||||
}
|
}
|
||||||
if ((win as any).navigator.clipboard && (win as any).navigator.clipboard.writeText) {
|
if ((win as any).clipboardData && (win as any).clipboardData.setData) {
|
||||||
(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.
|
// IE specific code path to prevent textarea being shown while dialog is visible.
|
||||||
(win as any).clipboardData.setData('Text', text);
|
(win as any).clipboardData.setData('Text', text);
|
||||||
} else if (doc.queryCommandSupported && doc.queryCommandSupported('copy')) {
|
} else if (doc.queryCommandSupported && doc.queryCommandSupported('copy')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user