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

getDomRangeFromRangeCfi() does not accept some CFI generated from addSelectionHighlight() function #54

Open
tybw opened this issue Sep 2, 2016 · 2 comments

Comments

@tybw
Copy link

tybw commented Sep 2, 2016

This issue is a Bug

Related issue(s) and/or pull request(s)

None

Expected Behaviour

CFI generated by reader.plugins.highlights.addSelectionHighlight() should pass the isRangeCfi() checking.

Observed behaviour

A sample CFI generated by the plugin function addSelectionHighlight() looks like /4,/64/1:433,/66/1:10 when the selection spanning across paragraphs. When the same CFI is fed into Readium's reader.getDomRangeFromRangeCfi() function, it failed the validation at cfi_interpreter.js's isRangeCfi() function.

Test file(s)

The epub file with no image downloaded from http://www.gutenberg.org/ebooks/271

Product

Readium JS and Readium JS highlight plugin.
On Linux.

@danielweck
Copy link
Member

I assigned @jccr just as a heads-up, just in case there is already a fix via another issue or pull request.
Related: readium/readium-shared-js#353

@danielweck
Copy link
Member

Related: readium/readium-shared-js#345

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

No branches or pull requests

4 participants