diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
index 86cb949..380a722 100644
|
|
|
67 | 67 | construct = this; |
68 | 68 | params = params || {}; |
69 | 69 | focus = function () { |
70 | | construct.container.find( ':focusable:first' ).focus(); |
71 | | construct.container[0].scrollIntoView( true ); |
| 70 | var focusContainer; |
| 71 | if ( construct.extended( api.Panel ) && construct.expanded() ) { |
| 72 | focusContainer = construct.container.find( '.control-panel-content:first' ); |
| 73 | } else { |
| 74 | focusContainer = construct.container; |
| 75 | } |
| 76 | focusContainer.find( ':focusable:first' ).focus(); |
| 77 | focusContainer[0].scrollIntoView( true ); |
72 | 78 | }; |
73 | 79 | if ( params.completeCallback ) { |
74 | 80 | completeCallback = params.completeCallback; |
… |
… |
|
715 | 721 | content.show( 0, function() { |
716 | 722 | position = content.offset().top; |
717 | 723 | scroll = container.scrollTop(); |
718 | | content.css( 'margin-top', ( 45 - position - scroll ) ); |
| 724 | content.css( 'margin-top', ( $( '#customize-header-actions' ).height() - position - scroll ) ); |
719 | 725 | section.addClass( 'current-panel' ); |
720 | 726 | overlay.addClass( 'in-themes-panel' ); |
721 | 727 | container.scrollTop( 0 ); |
… |
… |
|
1039 | 1045 | }); |
1040 | 1046 | |
1041 | 1047 | content.show( 0, function() { |
| 1048 | content.parent().show(); |
1042 | 1049 | position = content.offset().top; |
1043 | 1050 | scroll = container.scrollTop(); |
1044 | | content.css( 'margin-top', ( 45 - position - scroll ) ); |
| 1051 | content.css( 'margin-top', ( $( '#customize-header-actions' ).height() - position - scroll ) ); |
1045 | 1052 | section.addClass( 'current-panel' ); |
1046 | 1053 | overlay.addClass( 'in-sub-panel' ); |
1047 | 1054 | container.scrollTop( 0 ); |