1
0
mirror of https://github.com/bitwarden/web synced 2025-12-11 13:53:17 +00:00

Append copy textarea to model for all browsers

This commit is contained in:
Kyle Spearrin
2019-12-31 14:35:58 -05:00
parent 36244d58aa
commit 45c07b7c39

View File

@@ -270,8 +270,8 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
// Prevent scrolling to bottom of page in MS Edge. // Prevent scrolling to bottom of page in MS Edge.
textarea.style.position = 'fixed'; textarea.style.position = 'fixed';
let copyEl = doc.body; let copyEl = doc.body;
// For some reason copy command won't work in Firefox when modal is open if appending to body // For some reason copy command won't work when modal is open if appending to body
if (this.isFirefox() && doc.body.classList.contains('modal-open')) { if (doc.body.classList.contains('modal-open')) {
copyEl = doc.body.querySelector<HTMLElement>('.modal'); copyEl = doc.body.querySelector<HTMLElement>('.modal');
} }
copyEl.appendChild(textarea); copyEl.appendChild(textarea);