These are the changes I made

I made the following changes to my local copy of the ListViewer Im not sure if they are accurate but the things I was trying to do started working as expected.
I console logged both this.canvas.offsetTop and this.dom.offsetTop while scrolling down on a large pdf and noticed that suddenly this.canvas.offsetTop increased dramatically from having been zero all the time it moved to 12000. This caused the function using this function to return null. Thus I removed  this.canvas.offsetTop and I have not had any problems since.