Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendition.display() switch to wrong page for ebooks with vertical text #1093

Open
Arvamer opened this issue Jun 29, 2020 · 8 comments
Open

Comments

@Arvamer
Copy link

Arvamer commented Jun 29, 2020

Instead of requested location, it display beginning of section (beginning of source xml file, after page break; not sure what terminology is used in epub.js). This bug can be observed on Kusamakura from epub3 samples. This particular sample have some more bugs related to switching pages, so if necessary, I could try to prepare more minimal epub.

To reproduce, open ebook with vertical text and go to page that is not beginning of section. After calling rendition.display(some_cfi_to_visible_text) it will wrongly show beginning of current section.

@johnfactotum
Copy link
Contributor

Seems to happen with horizontal right-to-left books as well. Can reproduce with Israel Sailing from EPUB 3 Samples.

@dannwise
Copy link

dannwise commented Oct 4, 2020

I am having the same issue with rendition.display not showing the correct page for the input CFI. Anyone have an answer for this issue?

@Tywele
Copy link

Tywele commented Apr 8, 2021

I think I'm having the same problem. I grabbed the cfi at the start and end of my epub with

rendition.on('relocated', (location) => {
        console.log(location.start.cfi);
        console.log(location.end.cfi);
      })

and tested rendition.display(end_cfi) but it will still display the beginning of the section.

@Umi-L
Copy link

Umi-L commented Mar 4, 2022

Same issue, any fixes? Input CFI will always put me at the start of the chapter.

@tjmtmmnk
Copy link

related? #1277
However, regardless of this change, the display of Kusamakura was broken in my environment...

Screen Shot 2022-06-17 at 12 17 40

@johnfactotum
Copy link
Contributor

It's been a while since I looked into it, but I seem to remember that Kusamakura being broken was in large part caused by its html having margin/padding/max-height set which Epub.js does not reset completely or take into account.

@tjmtmmnk
Copy link

tjmtmmnk commented Jul 4, 2022

@johnfactotum
Could you review #1277 ?

@thuynt46
Copy link

@tjmtmmnk

I get the same issue as you when I'm trying to use epubjs in npm. Can you help me to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants