Merge pull request #4645 from Snuffleupagus/issue-4642
Only handle scroll events when PDFView.pdfDocument is defined (issue 4642)
This commit is contained in:
commit
b088690f1a
@ -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…
Reference in New Issue
Block a user