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
This commit is contained in:
@@ -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 <input>, <textarea> and <button> must be changed explicitly.
|
||||
$element.find( 'textarea, input, button' )
|
||||
.not( this.options.exclude )
|
||||
.css( 'font-family', fontStack.join() );
|
||||
// Add class webfonts-changed when webfonts are applied.
|
||||
$element.find( 'textarea, input, button' ).not( this.options.exclude )
|
||||
.css( 'font-family', fontStack.join() )
|
||||
.addClass( 'webfonts-changed' );
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -328,6 +332,9 @@
|
||||
* Reset the font-family style.
|
||||
*/
|
||||
reset: function() {
|
||||
this.$element.find( '.webfonts-changed' )
|
||||
.removeClass( '.webfonts-changed' )
|
||||
.css( 'font-family', '' );
|
||||
this.apply( this.originalFontFamily );
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user