futurepress/epub.js — pull request #169 by bielskij (2014-11-12 12:16:58+00:00)
Title: Fixed issue with buggy working getBoundingClientRect() function

Hi,

I've found an issue with buggy working function getBoundingClientRect() on Android in version 4.2.1, it returns null on proper object range.

Use case:
- load book
- call nextPage()
- call prevPage()
- on JS console is reported an error: "Cannot read property 'left' of null at ...:
- from that place:
* event locationChanged is never reported
* each call to nextPage(), prevPage() cause warning on the console: "Renderer is moving" and finally no changes on WebView. Epub.js engine needs to reload.

I cannot share my epub due to ownership (it's watermarked), but I think it is important that the first few chapters have only one page and issue occurs on these chapters.

I've applied a patch containing a workaround for the issue.