Customize: Fix logic for determining the container element when focusing on a panel, section, or control.

Fixes #33695 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@33939 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2015-09-07 05:58:44 +00:00
parent 0c101e8cf6
commit 395c8b7cd4

View File

@ -82,8 +82,10 @@
params = params || {};
focus = function () {
var focusContainer;
if ( construct.expanded && construct.expanded() ) {
focusContainer = construct.container.find( 'ul:first' );
if ( construct.extended( api.Panel ) && construct.expanded && construct.expanded() ) {
focusContainer = construct.container.find( 'ul.control-panel-content' );
} else if ( construct.extended( api.Section ) && construct.expanded && construct.expanded() ) {
focusContainer = construct.container.find( 'ul.accordion-section-content' );
} else {
focusContainer = construct.container;
}