diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
index 5d0b30b..d20933a 100644
|
|
|
284 | 284 | * @param {Object} args.completeCallback |
285 | 285 | */ |
286 | 286 | onChangeActive: function ( active, args ) { |
287 | | var duration = ( 'resolved' === api.previewer.deferred.active.state() ? args.duration : 0 ); |
288 | | if ( ! $.contains( document, this.container ) ) { |
| 287 | var duration = ( 'resolved' === api.previewer.deferred.active.state() ? args.duration : 0 ), |
| 288 | construct = this; |
| 289 | if ( ! $.contains( document, construct.container[0] ) ) { |
289 | 290 | // jQuery.fn.slideUp is not hiding an element if it is not in the DOM |
290 | | this.container.toggle( active ); |
| 291 | construct.container.toggle( active ); |
291 | 292 | if ( args.completeCallback ) { |
292 | 293 | args.completeCallback(); |
293 | 294 | } |
294 | 295 | } else if ( active ) { |
295 | | this.container.stop( true, true ).slideDown( duration, args.completeCallback ); |
| 296 | construct.container.stop( true, true ).slideDown( duration, args.completeCallback ); |
296 | 297 | } else { |
297 | | this.container.stop( true, true ).slideUp( duration, args.completeCallback ); |
| 298 | if ( construct.expanded() ) { |
| 299 | construct.collapse({ |
| 300 | duration: duration, |
| 301 | completeCallback: args.completeCallback |
| 302 | }); |
| 303 | } else { |
| 304 | construct.container.stop( true, true ).slideUp( duration, args.completeCallback ); |
| 305 | } |
298 | 306 | } |
299 | 307 | }, |
300 | 308 | |
… |
… |
|
596 | 604 | position = content.offset().top; |
597 | 605 | scroll = container.scrollTop(); |
598 | 606 | content.css( 'margin-top', ( 45 - position - scroll ) ); |
| 607 | if ( args.completeCallback ) { |
| 608 | args.completeCallback(); |
| 609 | } |
599 | 610 | }; |
600 | 611 | } |
601 | 612 | |
… |
… |
|
622 | 633 | content.css( 'margin-top', 'inherit' ); |
623 | 634 | container.scrollTop( 0 ); |
624 | 635 | section.container.find( '.accordion-section-title' ).focus(); |
| 636 | if ( args.completeCallback ) { |
| 637 | args.completeCallback(); |
| 638 | } |
625 | 639 | } |
626 | 640 | } |
627 | 641 | }); |