readium / readium-js-viewer

👁 ReadiumJS viewer: default web app for Readium.js library
BSD 3-Clause "New" or "Revised" License
553 stars 186 forks source link

getFirstVisibleCfi not working with certain markup, for certain browsers #575

Open kimtuck opened 8 years ago

kimtuck commented 8 years ago

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):

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html>

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)

danielweck commented 8 years ago

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

kimtuck commented 8 years ago

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

danielweck commented 8 years ago

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

jccr commented 7 years ago

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