Merge pull request #4645 from Snuffleupagus/issue-4642

Only handle scroll events when PDFView.pdfDocument is defined (issue 4642)
This commit is contained in:
Yury Delendik 2014-04-23 20:23:41 -05:00
commit b088690f1a

View File

@ -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) {