Widget Customizer: Restore deferral of previewer-loading class removal until preview is synced.

props westonruter.
fixes #27635.

git-svn-id: https://develop.svn.wordpress.org/trunk@27913 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2014-04-02 19:24:18 +00:00
parent 41c2ce306a
commit 63a83c88f8

View File

@@ -1285,6 +1285,9 @@ var WidgetCustomizer = ( function ($) {
control.is_widget_updating = true; // suppress triggering another updateWidget
control.setting( r.data.instance );
control.is_widget_updating = false;
} else {
// no change was made, so stop the spinner now instead of when the preview would updates
control.container.removeClass( 'previewer-loading' );
}
if ( complete_callback ) {
@@ -1308,7 +1311,6 @@ var WidgetCustomizer = ( function ($) {
}
} );
jqxhr.always( function () {
control.container.removeClass( 'previewer-loading' );
control.container.removeClass( 'widget-form-loading' );
inputs.each( function () {
$( this ).removeData( 'state' + update_number );