Skip to content

Commit

Permalink
Merge pull request #1178 from cdrini/fix/br-black-screen
Browse files Browse the repository at this point in the history
Call updateVisibleRegion after the UI has rendered
  • Loading branch information
cdrini authored Apr 4, 2023
2 parents 853b99c + 65890a1 commit e64270e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/BookReader/Mode1Up.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ export class Mode1Up {
});
}
this.mode1UpLit.jumpToIndex(startLeaf);
// Must explicitly call updateVisibleRegion, since no
// scroll event seems to fire.
this.mode1UpLit.updateVisibleRegion();
setTimeout(() => {
// Must explicitly call updateVisibleRegion, since no
// scroll event seems to fire.
this.mode1UpLit.updateVisibleRegion();
});
});
this.br.updateBrClasses();
}
Expand Down

0 comments on commit e64270e

Please sign in to comment.