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

Problem loading font on iOS devices where CSS media = print included #261

Open
tabrs opened this issue Jan 22, 2013 · 0 comments
Open

Problem loading font on iOS devices where CSS media = print included #261

tabrs opened this issue Jan 22, 2013 · 0 comments

Comments

@tabrs
Copy link

tabrs commented Jan 22, 2013

Problem is that iOS will not load such files at all. Fix should be then to remove such files selectivelly from code based on iOS detection or (can't say what influence it can have finally) to make following change in code

if (el.media.toLowerCase() == "print")
continue;

Complete function can be done as follows

function allStylesLoaded() {
// Internet Explorer's style sheet model, there's no need to do anything
if (document.createStyleSheet) return true;
// standards-compliant browsers
var el, i;
for (i = 0; el = links[i]; ++i) {
if (el.media.toLowerCase() == "print")
continue;
if (el.rel.toLowerCase() == 'stylesheet' && !isContainerReady(el)) return false;
}
for (i = 0; el = styles[i]; ++i) {
if (!isContainerReady(el)) return false;
}
return true;
}

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

No branches or pull requests

1 participant