Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.
This repository was archived by the owner on May 7, 2025. It is now read-only.

[Android Webview] Reflowable view: Wrong scrollHeight returned when launching the reader #206

Open
@don-jomedia

Description

@don-jomedia

We are adding a feature to our book reader for our Android application that will remember the last page the user was at in the book and the next time we launch the same book in the book reader, we will set the book at that page. We are using the book reader bookmarks mechanism for this.

What we are observing is that when we open the book at another location than the default first page of the book, the number of pages for that particular chapter is always close to double the expected number of pages.

We traced this in reflowable_view.js, in the updatePagination() method, this call:

_$epubHtml[0].scrollHeight

The value returned for scrollHeight is always wrong at launch, it always larger than what is expected. The result of that is that number of columns returned (which is the number of pages) is always larger, so we end up with a bunch of blank pages at the end of the chapter. Once the book is loaded and we switch chapter and then go back to that chapter, the number of pages returned is corrected and we don't have blank pages any longer.

Please let us know if you require more details.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions