ng2-pdfjs-viewer icon indicating copy to clipboard operation
ng2-pdfjs-viewer copied to clipboard

Viewer Intermittently Scrolls PDF Vertically on Load

Open maks-humeniuk opened this issue 5 years ago • 2 comments

I use PDF viewer within Dialog. When it opens, sometimes PDF is vertically scrolled to some position. It looks like this. I think this happens because of below code.

/**
 * Helper function to start monitoring the scroll event and converting them into
 * PDF.js friendly one: with scroll debounce and scroll direction.
 */
function watchScroll(viewAreaElement, callback)

How can I prevent that behavior?

maks-humeniuk avatar Jun 01 '20 11:06 maks-humeniuk

Fixed with [page]="1". Though, I think this is dirty hack. Please suggest something better.

maks-humeniuk avatar Jun 01 '20 13:06 maks-humeniuk

@Halfist Will update underlying pdf.js file. This is definitely a bug at PDFJS end. A newer version shouldhave fixed this

codehippie1 avatar Feb 28 '21 04:02 codehippie1