futurepress/epubjs-rn

Selecting/scrolling to first page of chapter causing jump to end of chapter

Opened this issue · 2 comments

So I am not sure if this is a bug, but I am having an issue with the reader jumping to the end of the chapter. It's happening in two instances.

  1. Chapter selection - I am using the onReady function to return me the book, I am then finding all the toc objects and creating a chapter menu drawer. When I select a chapter it updates the location using the chapter href (i.e chapter_008.xhtml) and it navigates to the chapter for a split second and then jumps to the last page of the chapter (chapter 8 in this example).

  2. Scrolling to the first page of a chapter - Same set up as above. For example, if I select chapter 8 from the menu, it navigates to chapter 8, then quickly jumps to the last page of that chapter. Then if I scroll forward to chapter 9, once the swipe is complete it then jumps to the last page of chapter 9.

Anyone else coming across this issue?

So I am not sure if this is a bug, but I am having an issue with the reader jumping to the end of the chapter. It's happening in two instances.

  1. Chapter selection - I am using the onReady function to return me the book, I am then finding all the toc objects and creating a chapter menu drawer. When I select a chapter it updates the location using the chapter href (i.e chapter_008.xhtml) and it navigates to the chapter for a split second and then jumps to the last page of the chapter (chapter 8 in this example).
  2. Scrolling to the first page of a chapter - Same set up as above. For example, if I select chapter 8 from the menu, it navigates to chapter 8, then quickly jumps to the last page of that chapter. Then if I scroll forward to chapter 9, once the swipe is complete it then jumps to the last page of chapter 9.

Anyone else coming across this issue?

I'm having this exact same issue when using scrolled flow instead of paginated. And it seems to only happen on the first page of each chapter. Did you ever figure it out?

So I was talking to another dev about this as well, he pointed me to this change and it seemed to help. I had to fork the repo though.

Definitely not ideal, I've fought with this package for a while..it's very buggy.

frasermince/epub.js@1db7813#diff-48d2e3d1d47f05ce8f3da98f05d11e67eb857ca7f43e9ea3cfa5fbf209aeff15R407