Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_pdfviewer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/css
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2020-05-13 22:25:47 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2020-05-15 02:21:43 +0300
commit041a36c91ff83a126f0395911a7394c40d78fb4f (patch)
tree55c10981df072e3bed1360c9a9f4d6128110fe80 /css
parent14d1ff0d34fcf1f2a8fba30c8f72f2bd10a1b783 (diff)
Prevent text selection when download is hidden
When the PDF is rendered PDFViewer creates canvases with the contents of the pages and, in front of them, it creates too a layer with HTML text elements that makes possible to select it. That text layer is used too by the search function to highlight the results, so it can not be removed. Instead of that the selection of the text is prevented using CSS. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'css')
-rw-r--r--css/viewer.css13
1 files changed, 13 insertions, 0 deletions
diff --git a/css/viewer.css b/css/viewer.css
index 297a8a7..9d4594c 100644
--- a/css/viewer.css
+++ b/css/viewer.css
@@ -29,3 +29,16 @@ html .doorHangerRight:before {
display: none;
}
}
+
+/* Prevent text selection when the download of a share is hidden. */
+.pdfViewer.disabledTextSelection .textLayer {
+ user-select: none;
+ -moz-user-select: none;
+ -webkit-user-select: none;
+ -ms-user-select: none;
+}
+
+/* Override text cursor in descendants. */
+.pdfViewer.disabledTextSelection .textLayer * {
+ cursor: default;
+}