Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#32492 closed defect (bug) (duplicate)

Customizer bug, Properly collapse all sections on .control-panel-back click

Reported by: dovyp's profile 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.

Attachments (1)

customize.32492.diff (450 bytes) - added by dovyp 9 years ago.
Diff file to get JS to properly collapse sections when panel is collapsed.

Download all attachments as: .zip

Change History (6)

@dovyp
9 years ago

Diff file to get JS to properly collapse sections when panel is collapsed.

This ticket was mentioned in Slack in #themereview by dovy. View the logs.


9 years ago

This ticket was mentioned in Slack in #core-customize by dovy. View the logs.


9 years ago

#3 @dovyp
9 years ago

Patch is up.

#4 @dovyp
9 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Though difference, #31336 solves the issue. ;)

#5 @DrewAPicture
9 years ago

  • Milestone Awaiting Review deleted

Duplicate of #31336.

Note: See TracTickets for help on using tickets.