Paging forward and back is sometimes off -- hack epub.js to use setTimeout
jmcglone opened this issue · comments
When reading EPUB backing up from the chapter is off -- in the Gabii example, the previous page from Apologia takes me deeper into the previous section, and then it's several next pages until I can get back to Apologia.
This seems to be due to the <img>
in the previous section loading after epub.js
scrolls to the "end" of the chapter. setTimeout
seems necessary for the epub manager to catch up with the iframe loading, but results in a "flicker", which can be minimized for just when this scenario happens.
Using a hacked version of epub.js
that wraps that shift in a setTimeout
"fixes" the problem.