Skip to content

Bug with continuous scroll on Android devices #1408

@Cherevatin

Description

@Cherevatin

Hi there!

I'm trying to epub book reader using epub-js and React Native. I found epubjs-react-native which is a wrapper over this library for convenient using in RN.

I want to make a continuous scroll throughout the whole book. To do this, I changed the corresponding parameters (see screenshot, manager is method in epub-js). So, after I set method=continuous and flow=scrolled the problem shown in the video appears on Android: when navigating to any chapter, the movement is incorrect. At the same time, everything works correctly on the iPhone.

I investigated epubjs-react-native source code and found that it only calls rendition.display() method to change the location, so I decided to dive into epub-js code because epubjs-react-native doesn't have any side effects on it.
In epub-js code, I was focused on the continuous manager's index.js file. There is update() and check() functions. During debugging, I found that after rendition.display() call the first navigation happens correctly (the exact location that is needed opens) but then update() or check() (I can't say exactly) methods are called again and moves book content to the wrong location. I tried to modify the code for a couple of days but there are a lot of variables and it's hard to understand their purpose without deep knowledge of this library's logic.

I would be very grateful if someone could tell me what the problem is.

417603789-1e0eb58a-d344-45e2-94bf-a472fd5ee9ae.mov
Image

cc @fchasen @JakeHartnell

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions