Make WordPress Core

Changeset 33754


Ignore:
Timestamp:
08/26/2015 07:25:20 AM (9 years ago)
Author:
westonruter
Message:

Customizer: Ensure persistence of unchanged active state for controls, sections, and panels.

Props nikeo, westonruter.
Fixes #33428 for trunk.
See also #33494.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/customize-controls.js

    r33610 r33754  
    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] ) ) {
     
    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
Note: See TracChangeset for help on using the changeset viewer.