diff --git a/static/js/script.js b/static/js/script.js
index 1cc62c9..632612c 100644
--- a/static/js/script.js
+++ b/static/js/script.js
@@ -412,26 +412,18 @@ document.addEventListener('DOMContentLoaded', () => {
btn._copyTimeout = setTimeout(() => btn.classList.remove('copied'), 1000);
}
- const fallbackTextarea = document.createElement('textarea');
- fallbackTextarea.style.position = 'fixed';
- fallbackTextarea.style.opacity = '0';
- fallbackTextarea.setAttribute('aria-hidden', 'true');
- fallbackTextarea.setAttribute('inputmode', 'none');
- document.body.appendChild(fallbackTextarea);
-
- document.addEventListener('focusin', (e) => {
- if (e.target.tagName === 'BUTTON') {
- e.target.blur();
- }
- });
-
function fallbackCopy(text, btn, count, format) {
- fallbackTextarea.value = text;
- fallbackTextarea.select();
+ const textarea = document.createElement('textarea');
+ textarea.value = text;
+ textarea.style.position = 'fixed';
+ textarea.style.opacity = '0';
+ document.body.appendChild(textarea);
+ textarea.select();
try {
if (document.execCommand('copy')) showCopySuccess(btn, count, format);
- else showNotification('Unable to copy. Please copy manually.', 'error');
- } catch { showNotification('Copy failed. Please copy manually.', 'error'); }
+ else showNotification('Unable to copy.', 'error');
+ } catch { showNotification('Copy failed.', 'error'); }
+ document.body.removeChild(textarea);
}
function setupGlobalCopyButton(btn, getThreshold) {
diff --git a/templates/index.html b/templates/index.html
index 4d980e6..a83cbba 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -144,7 +144,7 @@
Drag & drop image here, Ctrl+V or click to select
-Supports: PNG, JPG, GIF, WebP, BMP, TIFF (max 20MB)
+Supports: PNG, JPG, GIF, WebP (max 20MB)