WordPress.org

Make WordPress Core

Changeset 33941


Ignore:
Timestamp:
09/07/2015 06:13:17 AM (5 years ago)
Author:
westonruter
Message:

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

Cherry-picks [33754] onto 4.3 branch.
Props nikeo, westonruter.
Fixes #33428 for 4.3.
See also #33494.

File:
1 edited

Legend:

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

    r33940 r33941  
    287287         * @param {Object}  args.completeCallback
    288288         */
    289         onChangeActive: function ( active, args ) {
     289        onChangeActive: function( active, args ) {
    290290            var duration, construct = this;
     291            if ( args.unchanged ) {
     292                if ( args.completeCallback ) {
     293                    args.completeCallback();
     294                }
     295                return;
     296            }
     297
    291298            duration = ( 'resolved' === api.previewer.deferred.active.state() ? args.duration : 0 );
    292299            if ( ! $.contains( document, construct.container[0] ) ) {
     
    15001507         */
    15011508        onChangeActive: function ( active, args ) {
     1509            if ( args.unchanged ) {
     1510                if ( args.completeCallback ) {
     1511                    args.completeCallback();
     1512                }
     1513                return;
     1514            }
     1515
    15021516            if ( ! $.contains( document, this.container ) ) {
    15031517                // 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.