Make WordPress Core

Ticket #31014: 31014.diff

File 31014.diff, 865 bytes (added by utkarshd_42, 10 years ago)
  • customize-controls.js

     
    20632063                                instance.deferred.embedded.done( function () {
    20642064                                        // Wait until the preview has activated and so active panels, sections, controls have been set
    20652065                                        api.previewer.deferred.active.done( function () {
    2066                                                 instance.focus();
     2066                                                if( api.settings.autofocus[ type ] === "widgets" ) {
     2067                                                        instance.container.css( { 'top' : '-300px' } );
     2068                                                        $( '#customize-header-actions' ).on( 'click keydown', '.control-panel-back', function( event ) {
     2069                                                                instance.container.css({'top':''});
     2070                                                        });
     2071                                                }
     2072                                        instance.focus();
    20672073                                        });
    20682074                                });
    20692075                        }