diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
index 1f2f5db..320f892 100644
|
|
|
125 | 125 | } else { |
126 | 126 | params.completeCallback = focus; |
127 | 127 | } |
| 128 | |
| 129 | api.state( 'paneVisible' ).set( true ); |
128 | 130 | if ( construct.expand ) { |
129 | 131 | construct.expand( params ); |
130 | 132 | } else { |
… |
… |
|
441 | 443 | return false; |
442 | 444 | } |
443 | 445 | |
| 446 | api.state( 'paneVisible' ).set( true ); |
444 | 447 | params.completeCallback = function() { |
445 | 448 | if ( previousCompleteCallback ) { |
446 | 449 | previousCompleteCallback.apply( instance, arguments ); |
… |
… |
|
3912 | 3915 | var state = new api.Values(), |
3913 | 3916 | saved = state.create( 'saved' ), |
3914 | 3917 | activated = state.create( 'activated' ), |
3915 | | processing = state.create( 'processing' ); |
| 3918 | processing = state.create( 'processing' ), |
| 3919 | paneVisible = state.create( 'paneVisible' ); |
3916 | 3920 | |
3917 | 3921 | state.bind( 'change', function() { |
3918 | 3922 | if ( ! activated() ) { |
… |
… |
|
3933 | 3937 | saved( true ); |
3934 | 3938 | activated( api.settings.theme.active ); |
3935 | 3939 | processing( 0 ); |
| 3940 | paneVisible( true ); |
3936 | 3941 | |
3937 | 3942 | api.bind( 'change', function() { |
3938 | 3943 | state('saved').set( false ); |
… |
… |
|
3974 | 3979 | }); |
3975 | 3980 | |
3976 | 3981 | $( '.collapse-sidebar' ).on( 'click', function() { |
3977 | | if ( 'true' === $( this ).attr( 'aria-expanded' ) ) { |
3978 | | $( this ).attr({ 'aria-expanded': 'false', 'aria-label': api.l10n.expandSidebar }); |
| 3982 | api.state( 'paneVisible' ).set( ! api.state( 'paneVisible' ).get() ); |
| 3983 | }); |
| 3984 | |
| 3985 | api.state( 'paneVisible' ).bind( function( paneVisible ) { |
| 3986 | overlay.toggleClass( 'expanded', paneVisible ); |
| 3987 | overlay.toggleClass( 'collapsed', ! paneVisible ); |
| 3988 | |
| 3989 | if ( ! paneVisible ) { |
| 3990 | $( '.collapse-sidebar' ).attr({ 'aria-expanded': 'false', 'aria-label': api.l10n.expandSidebar }); |
3979 | 3991 | } else { |
3980 | | $( this ).attr({ 'aria-expanded': 'true', 'aria-label': api.l10n.collapseSidebar }); |
| 3992 | $( '.collapse-sidebar' ).attr({ 'aria-expanded': 'true', 'aria-label': api.l10n.collapseSidebar }); |
3981 | 3993 | } |
3982 | | |
3983 | | overlay.toggleClass( 'collapsed' ).toggleClass( 'expanded' ); |
3984 | 3994 | }); |
3985 | 3995 | |
3986 | 3996 | // Keyboard shortcuts - esc to exit section/panel. |