From 63a83c88f8c1a2c9274f4131e2a89ec91ce958cd Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Wed, 2 Apr 2014 19:24:18 +0000 Subject: [PATCH] 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 --- src/wp-admin/js/customize-widgets.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/js/customize-widgets.js b/src/wp-admin/js/customize-widgets.js index 480806a9c7..a141893509 100644 --- a/src/wp-admin/js/customize-widgets.js +++ b/src/wp-admin/js/customize-widgets.js @@ -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 );