[wp-trac] [WordPress Trac] #33538: When customizer is loaded and after preview refresh, hidden controls in customizer are being displayed

WordPress Trac noreply at wordpress.org
Wed Aug 26 13:44:18 UTC 2015


#33538: When customizer is loaded and after preview refresh, hidden controls in
customizer are being displayed
--------------------------+---------------------------------------------
 Reporter:  progmastery   |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Customize     |     Version:  4.3
 Severity:  normal        |  Resolution:  duplicate
 Keywords:                |     Focuses:  ui, javascript, administration
--------------------------+---------------------------------------------
Description changed by SergeyBiryukov:

Old description:

> Be default, there is a script forcing display of all the controls (id
> ="customize-control-{theme_options}-{setting}" class="customize-
> control"), by giving them style "display:block" when customizer panel is
> loaded. When the section is being opened, its controls become visible.
>
> If the logic of some controls is such that a control B should be hidden
> on the beginning depending on state of control A (e.g. A is a checkbox or
> radio showing B), there is a need to run additional custom script to hide
> the control B.
>
> An example:
> Control A: "Front page displays"
> Control B "Front page" and "Posts page".
> From the beginning both A and B are displayed, even if A is set to 'your
> latest posts', after change again B is shown no matter what value A has.
>
> After change and preview refresh, all the controls in customizer are
> again being displayed. Even those that are hidden.
>
> Why customizer intereferes with the logic of all the controls?
>
> Maybe this issue is related to
> https://core.trac.wordpress.org/ticket/33494

New description:

 Be default, there is a script forcing display of all the controls (id
 ="customize-control-{theme_options}-{setting}" class="customize-control"),
 by giving them style "display:block" when customizer panel is loaded. When
 the section is being opened, its controls become visible.

 If the logic of some controls is such that a control B should be hidden on
 the beginning depending on state of control A (e.g. A is a checkbox or
 radio showing B), there is a need to run additional custom script to hide
 the control B.

 An example:
 Control A: "Front page displays"
 Control B "Front page" and "Posts page".
 From the beginning both A and B are displayed, even if A is set to 'your
 latest posts', after change again B is shown no matter what value A has.

 After change and preview refresh, all the controls in customizer are again
 being displayed. Even those that are hidden.

 Why customizer intereferes with the logic of all the controls?

 Maybe this issue is related to #33494

--

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33538#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list