Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#33538 closed defect (bug) (duplicate)

When customizer is loaded and after preview refresh, hidden controls in customizer are being displayed

Reported by: progmastery's profile progmastery Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3
Component: Customize Keywords:
Focuses: ui, javascript, administration Cc:

Description (last modified by SergeyBiryukov)

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

Change History (4)

#1 @westonruter
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

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.

#2 @progmastery
9 years ago

Yes, thanks @westonruter, the fix in that ticket is what needed.

#3 @SergeyBiryukov
9 years ago

  • Description modified (diff)

#4 @westonruter
9 years ago

Duplicate of #33494.

Note: See TracTickets for help on using tickets.