Only handle scroll events when PDFView.pdfDocument is defined (issue 4642)