[wp-trac] [WordPress Trac] #32492: Customizer bug, Properly collapse all sections on .control-panel-back click

WordPress Trac noreply at wordpress.org
Mon May 25 15:05:51 UTC 2015


#32492: Customizer bug, Properly collapse all sections on .control-panel-back click
--------------------------+-----------------------------
 Reporter:  dovyp         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Customize     |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32492>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list