Merge pull request #399 from appwrite/fix/copy-scrolling

fix: copy scrolling to bottom
This commit is contained in:
Torsten Dittmann authored and GitHub committed 2023-04-26 12:15:27 +02:00
commit e33319a6bb
1 file changed
+6
+6
View File
@@ -11,6 +11,12 @@ async function securedCopy(value: string) {
function unsecuredCopy(value: string) {
const textArea = document.createElement('textarea');
textArea.value = value;
// Avoid scrolling to bottom
textArea.style.top = '0';
textArea.style.left = '0';
textArea.style.position = 'fixed';
document.body.appendChild(textArea);
textArea.focus();
textArea.select();