copyTextToClipboard: support fullscreen

This commit is contained in:
zrose584 2022-07-30 17:37:29 +02:00 committed by Jesus
parent 65e7d85549
commit 7d767ff9ce
No known key found for this signature in database
GPG Key ID: 1CF930FB60A48142

View File

@ -94,7 +94,8 @@ function copyTextToClipboard(text) {
textArea.value = text;
document.body.appendChild(textArea);
let parent_el = video.parentElement;
parent_el.appendChild(textArea);
textArea.focus();
textArea.select();
@ -106,7 +107,7 @@ function copyTextToClipboard(text) {
console.log('Oops, unable to copy');
}
document.body.removeChild(textArea);
parent_el.removeChild(textArea);
}