readium-js-viewer icon indicating copy to clipboard operation
readium-js-viewer copied to clipboard

getFirstVisibleCfi not working with certain markup, for certain browsers

Open kimtuck opened this issue 9 years ago • 4 comments

I'm using the API call "getFirstVisibleCfi" to determine whether a page has visible content or not; and if not, I display a message indicating that the page is blank.

In particular, this is not working correctly for IE11.

Consider a chapter with the following markup (press the "pencil" (edit) to view the markup):

Some Text

the "Some Text" is visible text; but the code that is executed by getFirstVisibleCfi does not find it on IE11; it does not return a CFI. On Chrome and FF it works correctly.

It appears to be the tag with no content that is the issue here. I've also seen cases where there is similar markup, but instead of the span, there is an a tag ().

Hybrid app using ReadiumJS, release version (also appears in develop branch)

kimtuck avatar Oct 17 '16 17:10 kimtuck

ping @JCCR (just in case this issue, or similar, is on your radar already)

danielweck avatar Oct 17 '16 18:10 danielweck

Not sure what you meant there; should I ask JCCR if he's addressed this issue?

kimtuck avatar Oct 17 '16 21:10 kimtuck

Sorry, that wasn't clear at all: I just "pinged" Juan Corona by mentioning him, he will get a GitHub notification :)

danielweck avatar Oct 17 '16 21:10 danielweck

I have a solution for IE11 related visible CFI issues in the works.

jccr avatar Feb 20 '17 02:02 jccr