Changeset 52003
- Timestamp:
- 11/03/2021 03:04:55 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/wp/customize/controls.js
r51683 r52003 696 696 */ 697 697 focus = function ( params ) { 698 var construct, completeCallback, focus, focusElement ;698 var construct, completeCallback, focus, focusElement, sections; 699 699 construct = this; 700 700 params = params || {}; 701 701 focus = function () { 702 // If a child section is currently expanded, collapse it. 703 if ( construct.extended( api.Panel ) ) { 704 sections = construct.sections(); 705 if ( 1 < sections.length ) { 706 sections.forEach( function ( section ) { 707 if ( section.expanded() ) { 708 section.collapse(); 709 } 710 } ); 711 } 712 } 713 702 714 var focusContainer; 703 715 if ( ( construct.extended( api.Panel ) || construct.extended( api.Section ) ) && construct.expanded && construct.expanded() ) {
Note: See TracChangeset
for help on using the changeset viewer.