mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Only handle scroll events when PDFView.pdfDocument is defined (issue 4642)
This commit is contained in:
parent
a0625ec0e5
commit
4e1362642a
1 changed files with 3 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue