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.

git-svn-id: https://develop.svn.wordpress.org/trunk@33596 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2015-08-08 09:36:55 +00:00
parent c03388bd9d
commit 2d6c10b842
2 changed files with 4 additions and 3 deletions

View File

@ -73,8 +73,9 @@
} else {
focusContainer = construct.container;
}
focusContainer.find( ':focusable:first' ).focus();
focusContainer[0].scrollIntoView( true );
// Note that we can't use :focusable due to a jQuery UI issue. See: https://github.com/jquery/jquery-ui/pull/1583
focusContainer.find( 'input, select, textarea, button, object, a[href], [tabindex]' ).filter( ':visible' ).first().focus();
};
if ( params.completeCallback ) {
completeCallback = params.completeCallback;

View File

@ -1270,7 +1270,7 @@
if ( expanded ) {
if ( 'undefined' != typeof api.section( self.section ) && ! api.section( self.section ).expanded() ) {
if ( self.section() && api.section( self.section() ) ) {
self.expandControlSection();
}