Prevent "offsetParent is not set -- cannot scroll" errors when the viewer loads in e.g. a hidden <iframe>
Prevent "offsetParent is not set -- cannot scroll" errors when the viewer loads in e.g. a hidden <iframe>

Besides avoiding errors during loading, this also ensures that the document will be correctly scrolled/zoomed into view once the viewer becomes visible.
This "new" behaviour was always intended, see PR 2613, however various re-factoring over the years seem to have broken this (and I'm probably at least somewhat responsible for that).

showpad/mozilla-pdf.js,mainegreen/pdf.js,xavier114fch/pdf.js,Shoobx/pdf.js,Shoobx/pdf.js,timvandermeij/pdf.js,Snuffleupagus/pdf.js,Shoobx/pdf.js,mozilla/pdf.js,Snuffleupagus/pdf.js,mozilla/pdf.js,nawawi/pdf.js,showpad/mozilla-pdf.js,macroplant/pdf.js,Snuffleupagus/pdf.js,mainegreen/pdf.js,mozilla/pdf.js,caremerge/pdf.js,macroplant/pdf.js,timvandermeij/pdf.js,macroplant/pdf.js,caremerge/pdf.js,showpad/mozilla-pdf.js,nawawi/pdf.js,nawawi/pdf.js,timvandermeij/pdf.js,xavier114fch/pdf.js