and-rad / books

A Nextcloud application for managing your ebook library
GNU Affero General Public License v3.0
4 stars 1 forks source link

Investigate TOC Fails #9

Open and-rad opened 4 years ago

and-rad commented 4 years ago

epub30-spec.zip

Some table of contents entries fail to navigate to the specified position in the book. Clicking on them produces a No Section Found error.

Stack trace:

epub.min.js:formatted:5124 Uncaught (in promise) Error: No Section Found
    at b._display (epub.min.js:formatted:5124)
    at e.a.dequeue (epub.min.js:formatted:2541)
    at epub.min.js:formatted:2558
_display @ epub.min.js:formatted:5124
dequeue @ epub.min.js:formatted:2541
(anonymous) @ epub.min.js:formatted:2558
Promise.then (async)
dequeue @ epub.min.js:formatted:2541
(anonymous) @ epub.min.js:formatted:2558
requestAnimationFrame (async)
run @ epub.min.js:formatted:2557
enqueue @ epub.min.js:formatted:2535
display @ epub.min.js:formatted:5106
toSection @ app.js:1

Another problem is that TOC entries are not always highlighted even though they should be. Seems to be linked to url fragments.

An example file is attached.

and-rad commented 4 years ago

Helpful resources:

and-rad commented 4 years ago

Helpful resources for the highlight issue

and-rad commented 4 years ago

How to handle files that are listed in the spine but not in the TOC? They won't show up in the table of contents, but more importantly, they cause the highlight to disappear from the TOC entry.