#32492 closed defect (bug) (duplicate)
Customizer bug, Properly collapse all sections on .control-panel-back click
Reported by: | dovyp | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.3 |
Component: | Customize | Keywords: | |
Focuses: | Cc: |
Description
Small but annoying bug here. When inside a panel, and you click on .control-panel-back, it removes the "open" class from all contained sections. However, it does NOT collapse those sections. So if you return to the same panel, the section that was previously selected remains open, but the section icon appears closed.
I think it would take more effort to keep that section open, than to just collapse it properly.
On line 2923, if you append the following code, the sections within the panel will properly collapse.
api.section.each( function ( section ) { section.collapse( { duration: 0 } ); }); api.panel.each( function ( panel ) { panel.collapse(); });
Nothing is special about this code, but it properly applies the desired effect.
Patch will be supplied after ticket is generated.
Diff file to get JS to properly collapse sections when panel is collapsed.