diff --git a/frontend/templates/file_detail.html b/frontend/templates/file_detail.html
index 4681086f..48029c20 100644
--- a/frontend/templates/file_detail.html
+++ b/frontend/templates/file_detail.html
@@ -1546,8 +1546,8 @@
-
-
See PDF viewer above
+
+
This PDF is displayed in the Document Previews section at the top of the page.
{% endif %}
@@ -1570,8 +1570,8 @@
-
-
See PDF viewer above
+
+
This PDF is displayed in the Document Previews section at the top of the page.
diff --git a/frontend/templates/file_view.html b/frontend/templates/file_view.html
index ac0548e1..873ab6e7 100644
--- a/frontend/templates/file_view.html
+++ b/frontend/templates/file_view.html
@@ -655,7 +655,19 @@
navigator.clipboard.writeText(text.join('\n')).then(function() {
btn.innerHTML = ' Copied!';
setTimeout(function() { btn.innerHTML = orig; }, 2000);
- }).catch(function() {});
+ }).catch(function() {
+ try {
+ var ta = document.createElement('textarea');
+ ta.value = text.join('\n');
+ ta.style.cssText = 'position:fixed;opacity:0;';
+ document.body.appendChild(ta);
+ ta.select();
+ document.execCommand('copy');
+ document.body.removeChild(ta);
+ btn.innerHTML = ' Copied!';
+ setTimeout(function() { btn.innerHTML = orig; }, 2000);
+ } catch(e) {}
+ });
}
// ── Initialise on load ──
diff --git a/tests/test_document_preview.py b/tests/test_document_preview.py
index c996c0d5..45e46c3c 100644
--- a/tests/test_document_preview.py
+++ b/tests/test_document_preview.py
@@ -71,8 +71,8 @@ class TestFileViewPdfJs:
assert 'id="pdf-page-info"' in html
assert "pdfInit(" in html
- # Should NOT have an iframe for this type
- assert "