Make WordPress Core

Changeset 33596


Ignore:
Timestamp:
08/08/2015 09:36:55 AM (11 years ago)
Author:
ocean90
Message:

Customizer: Restore Shift + Clicking on widgets to open the widgets panel.

Includes an alternative for jQuery UI's :focusable selector because it has an ancestor visibility requirement, see ​https://github.com/jquery/jquery-ui/pull/1583.

props westonruter.
fixes #33258.

Location:
trunk/src/wp-admin/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/customize-controls.js

    r33492 r33596  
    7474                                focusContainer = construct.container;
    7575                        }
    76                         focusContainer.find( ':focusable:first' ).focus();
    77                         focusContainer[0].scrollIntoView( true );
     76
     77                        // Note that we can't use :focusable due to a jQuery UI issue. See: https://github.com/jquery/jquery-ui/pull/1583
     78                        focusContainer.find( 'input, select, textarea, button, object, a[href], [tabindex]' ).filter( ':visible' ).first().focus();
    7879                };
    7980                if ( params.completeCallback ) {
  • trunk/src/wp-admin/js/customize-widgets.js

    r33488 r33596  
    12711271                        if ( expanded ) {
    12721272
    1273                                 if ( 'undefined' != typeof api.section( self.section ) && ! api.section( self.section ).expanded() ) {
     1273                                if ( self.section() && api.section( self.section() ) ) {
    12741274                                        self.expandControlSection();
    12751275                                }
Note: See TracChangeset for help on using the changeset viewer.