copyTextToClipboard: support fullscreen
This commit is contained in:
parent
65e7d85549
commit
7d767ff9ce
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user