mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Customizer: Collapse any expanded panel/sections before expanding other panel/sections
Fix removes need for workaround introduced in [33488] for direct link from nav menu widget to the customizer widgets panel. The todo is now implemented. Props celloexpressions, westonruter. Fixes #33396 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@33837 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -655,6 +655,9 @@
|
||||
completeCallback: expand
|
||||
});
|
||||
} else {
|
||||
api.panel.each( function( panel ) {
|
||||
panel.collapse();
|
||||
});
|
||||
expand();
|
||||
}
|
||||
|
||||
@@ -1264,7 +1267,7 @@
|
||||
|
||||
// Collapse any sibling sections/panels
|
||||
api.section.each( function ( section ) {
|
||||
if ( ! section.panel() ) {
|
||||
if ( panel.id !== section.panel() ) {
|
||||
section.collapse( { duration: 0 } );
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user