Open EdwinGuzman opened 5 years ago
Just a note: I am not sure about the version of Readium_cloud-reader-lite.zip
available on the readium.org
website. I would recommend using the official GitHub releases:
https://github.com/readium/readium-js-viewer/releases/tag/0.31.1
By design, CFI references do break if the DOM / document markup changes. There is no way around that, other than blacklisting / skipping injected elements that are added at runtime for specific presentation / rendering purposes (i.e. not part of the original authored publication, and not meant to be persistent). For example, Readium blacklists the markup generated for MathJax, annotations, etc.
This issue is a Bug
Related issue
Example: See also #388
Observed behavior
We tested this on the debugger using Readium's
Readium_cloud-reader-lite.zip
(hosted here: https://readium.org/technical/technical-notes/_posts/testing-with-cloudreader/)Under certain circumstances, a location/CFI reported by the SDK becomes invalid (or no longer exists in the new DOM structure). The easiest way to demonstrate is to:
Outcome:
In our test, we ask for the current location calling
bookmarkCurrentPage()
, make the font change, navigate away, and then try to navigate back to that spot usingopenSpineElementCfi()
.Steps to reproduce
The "changes" we've tested so far that we know will cause the bug:
Test file(s)
We tested on a handful of DRM-free Epub's, which we can provide but don't expect to make a difference.
Product
readium-shared-js
library on Android and iOS platforms.