epubjs-reader icon indicating copy to clipboard operation
epubjs-reader copied to clipboard

Bookmarks not listing correct location

Open bgoldowsky opened this issue 6 years ago • 3 comments

Just tried out the demo site, noticed this.

  1. In Chrome incognito window, visit http://futurepress.github.com/epubjs-reader/
  2. In TOC sidebar, click on "Chapter 43. Hark!" to navigate there.
  3. Close sidebar, click Bookmark icon
  4. Re-open sidebar to the bookmarks view. The bookmark list now has an entry saying "Chapter 45. The Affidavit." but it presumably ought to display "Chapter 43. Hark!"

bgoldowsky avatar Jun 28 '18 17:06 bgoldowsky

@bgoldowsky did you investigate what was causing this, and did you resolve it? If so, can you share a code snippet?

coler-j avatar Sep 06 '18 18:09 coler-j

I saw the same issue on every epub reader here from futurepress...There's a difference of 2 on the index every time you add a bookmark. It seems that only the label added to the bookmark lists is wrong becouse if you click the bookmark it goes to the exact position..Can it be solved?

CatalinCernea avatar Dec 09 '19 13:12 CatalinCernea

adding -2 when retrieving the tocitem solved for me for the moment.. bookmark_controller tocItem = book.navigation.toc[spineItem.index-2];

CatalinCernea avatar Dec 09 '19 14:12 CatalinCernea