Changeset 31920
- Timestamp:
- 03/29/2015 11:16:30 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r31918 r31920 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 ) { … … 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' ); … … 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' );
Note: See TracChangeset
for help on using the changeset viewer.