copyTextToClipboard: support fullscreen

This commit is contained in:
zrose584
2022-07-30 17:37:29 +02:00
committed by Jesus
parent 65e7d85549
commit 7d767ff9ce

View File

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