diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-03-07 17:18:47 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-03-07 17:18:47 +0100 |
commit | 950ab4ef039a5f5cb9d70a3154cfafeaad760692 (patch) | |
tree | c8cb58591fb8c56e6e3e9ef7c8542eabb6ce96d8 /dist/js | |
parent | 9de6a7e224070a610628beee07313200cf5bdbb6 (diff) | |
download | www-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.js | 6 |
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 | */ |
65 | function onPrevPage() { | 65 | function 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 | */ |
77 | function onNextPage() { | 78 | function onNextPage(event) { |
79 | event.preventDefault(); | ||
78 | if (pageNum >= pdfDoc.numPages - 1) { | 80 | if (pageNum >= pdfDoc.numPages - 1) { |
79 | return; | 81 | return; |
80 | } | 82 | } |