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

FIX webfonts in preview iframe breaking admin fonts #2351

Merged
merged 1 commit into from
Aug 26, 2013

Conversation

hafriedlander
Copy link
Contributor

No description provided.

@@ -225,14 +225,30 @@
},

/**
* Return a style element we can use in IE8 to fix fonts (see readystatechange binding in onadd below)
*/
getFontFixStyleElement: function() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor niggle: A method named like a getter shouldn't modify state (like adding DOM elements). How about appendFontFixStyleElement()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not quite accurate either, because it will only append if one doesn't already exist. I'll call it getOrAppendFontFixStyleElement

@mateusz
Copy link
Contributor

mateusz commented Aug 26, 2013

@hafriedlander would it be possible to add the URL of the source where the fix is coming from to the commit description? It looks truly peculiar, and having some extra information on it would be great. Unless it's long lost :-)

In IE8, when a page in the preview iframe uses a web font (not just
references it in CSS, but actually has glyphs present in the page),
the fonts in the containing admin interface will become corrupted
(display as all squares) until the mouse moves.

This commit uses the technique described at
http://stackoverflow.com/questions/9809351/ie8-css-font-face-fonts-only-working-for-before-content-on-over-and-sometimes#10557782
to cause the admin panel to re-calculated all it's fonts
after the preview iframe has loaded, fixing the glitch
mateusz added a commit that referenced this pull request Aug 26, 2013
FIX webfonts in preview iframe breaking admin fonts
@mateusz mateusz merged commit c396645 into silverstripe:3.1.0 Aug 26, 2013
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

Successfully merging this pull request may close these issues.

None yet

3 participants