aboutsummaryrefslogtreecommitdiff
path: root/dist/js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-03-07 17:18:47 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-03-07 17:18:47 +0100
commit950ab4ef039a5f5cb9d70a3154cfafeaad760692 (patch)
treec8cb58591fb8c56e6e3e9ef7c8542eabb6ce96d8 /dist/js
parent9de6a7e224070a610628beee07313200cf5bdbb6 (diff)
downloadwww-950ab4ef039a5f5cb9d70a3154cfafeaad760692.tar.gz
www-950ab4ef039a5f5cb9d70a3154cfafeaad760692.zip
prevent default action that selects text on double click
Diffstat (limited to 'dist/js')
-rw-r--r--dist/js/pdf-view.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/dist/js/pdf-view.js b/dist/js/pdf-view.js
index cb125586..3c39ba73 100644
--- a/dist/js/pdf-view.js
+++ b/dist/js/pdf-view.js
@@ -62,7 +62,8 @@ function queueRenderPage(num) {
62/** 62/**
63 * Displays previous page. 63 * Displays previous page.
64 */ 64 */
65function onPrevPage() { 65function onPrevPage(event) {
66 event.preventDefault();
66 if (pageNum <= 1) { 67 if (pageNum <= 1) {
67 return; 68 return;
68 } 69 }
@@ -74,7 +75,8 @@ document.getElementById('canvas-left').addEventListener('click', onPrevPage);
74/** 75/**
75 * Displays next page. 76 * Displays next page.
76 */ 77 */
77function onNextPage() { 78function onNextPage(event) {
79 event.preventDefault();
78 if (pageNum >= pdfDoc.numPages - 1) { 80 if (pageNum >= pdfDoc.numPages - 1) {
79 return; 81 return;
80 } 82 }