mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #11129 from Snuffleupagus/animationStarted-setInitialView
Prevent "offsetParent is not set -- cannot scroll" errors when the viewer loads in e.g. a hidden <iframe>
This commit is contained in:
commit
4fa60f006b
1 changed files with 8 additions and 3 deletions
11
web/app.js
11
web/app.js
|
@ -939,8 +939,13 @@ let PDFViewerApplication = {
|
|||
}).catch(() => { /* Unable to read from storage; ignoring errors. */ });
|
||||
|
||||
Promise.all([
|
||||
storePromise, pageLayoutPromise, pageModePromise, openActionDestPromise,
|
||||
]).then(async ([values = {}, pageLayout, pageMode, openActionDest]) => {
|
||||
animationStarted,
|
||||
storePromise,
|
||||
pageLayoutPromise,
|
||||
pageModePromise,
|
||||
openActionDestPromise,
|
||||
]).then(async ([timeStamp, values = {}, pageLayout, pageMode,
|
||||
openActionDest]) => {
|
||||
const viewOnLoad = AppOptions.get('viewOnLoad');
|
||||
|
||||
this._initializePdfHistory({
|
||||
|
@ -1088,7 +1093,7 @@ let PDFViewerApplication = {
|
|||
});
|
||||
});
|
||||
|
||||
Promise.all([onePageRendered, animationStarted]).then(() => {
|
||||
onePageRendered.then(() => {
|
||||
pdfDocument.getOutline().then((outline) => {
|
||||
this.pdfOutlineViewer.render({ outline, });
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue