Rendition.display() switch to wrong page for ebooks with vertical text
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.
Seems to happen with horizontal right-to-left books as well. Can reproduce with Israel Sailing from EPUB 3 Samples.
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?
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.
Same issue, any fixes? Input CFI will always put me at the start of the chapter.
related? #1277 However, regardless of this change, the display of Kusamakura was broken in my environment...

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.
@johnfactotum Could you review #1277 ?
@tjmtmmnk
I get the same issue as you when I'm trying to use epubjs in npm. Can you help me to fix this?