#33538 closed defect (bug) (duplicate)
When customizer is loaded and after preview refresh, hidden controls in customizer are being displayed
Reported by: | progmastery | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.3 |
Component: | Customize | Keywords: | |
Focuses: | ui, javascript, administration | Cc: |
Description (last modified by )
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
Thanks for the report. This is a duplicate of #33428. Please test the patch on that ticket to confirm it fixes your issue, and follow up on that ticket.