copyTextToClipboard: support fullscreen
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user