From d8c6e59da89e433f5f137bca9182139c4df362fd Mon Sep 17 00:00:00 2001 From: Kartik Mistry Date: Fri, 14 Mar 2014 10:18:40 +0530 Subject: [PATCH] Update jquery.webfonts from upstream Upstream: https://github.com/wikimedia/jquery.webfonts Changes: * Bug 56081: Reset webfonts where we found inline css style upon reset. This will fix broken live preview of content font bug. Change-Id: I60a75611db8cc299b6cc9ba14c5aff6719cb3239 --- lib/jquery.webfonts.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/jquery.webfonts.js b/lib/jquery.webfonts.js index e7ce234b..24d3d1d3 100644 --- a/lib/jquery.webfonts.js +++ b/lib/jquery.webfonts.js @@ -118,14 +118,18 @@ // This will cause removing inline fontFamily style. } - // Set the font of this element if it's not excluded - $element.not( this.options.exclude ).css( 'font-family', fontStack.join() ); + // Set the font of this element if it's not excluded. + // Add class webfonts-changed when webfonts are applied. + $element.not( this.options.exclude ) + .css( 'font-family', fontStack.join() ) + .addClass( 'webfonts-changed' ); // Set the font of this element's children if they are not excluded. // font-family of ,