Make WordPress Core

Ticket #33428: 33428.3.diff

File 33428.3.diff, 1.2 KB (added by westonruter, 8 years ago)

Additional change: https://github.com/xwp/wordpress-develop/commit/6f68997198b08fd44bd0b2481e08c8216914ff13

  • src/wp-admin/js/customize-controls.js

    diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
    index 1e5103a..84f7faf 100644
     
    284284                 * @param {Object}  args.duration
    285285                 * @param {Object}  args.completeCallback
    286286                 */
    287                 onChangeActive: function ( active, args ) {
     287                onChangeActive: function( active, args ) {
    288288                        var duration, construct = this;
     289                        if ( args.unchanged ) {
     290                                if ( args.completeCallback ) {
     291                                        args.completeCallback();
     292                                }
     293                                return;
     294                        }
     295
    289296                        duration = ( 'resolved' === api.previewer.deferred.active.state() ? args.duration : 0 );
    290297                        if ( ! $.contains( document, construct.container[0] ) ) {
    291298                                // jQuery.fn.slideUp is not hiding an element if it is not in the DOM
     
    14971504                 * @param {Callback} args.completeCallback
    14981505                 */
    14991506                onChangeActive: function ( active, args ) {
     1507                        if ( args.unchanged ) {
     1508                                if ( args.completeCallback ) {
     1509                                        args.completeCallback();
     1510                                }
     1511                                return;
     1512                        }
     1513
    15001514                        if ( ! $.contains( document, this.container ) ) {
    15011515                                // jQuery.fn.slideUp is not hiding an element if it is not in the DOM
    15021516                                this.container.toggle( active );