[Pkg-javascript-commits] [pdf.js] 02/210: Only handle scroll events when PDFView.pdfDocument is defined (issue 4642)

David Prévot taffit at moszumanska.debian.org
Thu Jun 5 14:20:55 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch upstream
in repository pdf.js.

commit 4e1362642aa90a532c017ced4c6a20aa27bf8afb
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Sat Apr 19 01:30:40 2014 +0200

    Only handle scroll events when PDFView.pdfDocument is defined (issue 4642)
---
 web/viewer.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/web/viewer.js b/web/viewer.js
index 9c11985..4a0fe55 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -242,6 +242,9 @@ var PDFView = {
     state.down = true;
     state.lastY = viewAreaElement.scrollTop;
     viewAreaElement.addEventListener('scroll', function webViewerScroll(evt) {
+      if (!PDFView.pdfDocument) {
+        return;
+      }
       var currentY = viewAreaElement.scrollTop;
       var lastY = state.lastY;
       if (currentY > lastY) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list