Opened 10 years ago
Closed 10 years ago
#30378 closed defect (bug) (fixed)
Empty widget areas get deactivated in the Customizer
Reported by: | celloexpressions | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | blocker | Version: | 4.1 |
Component: | Customize | Keywords: | has-patch |
Focuses: | javascript | Cc: |
Description
There's a regression here, likely related to #28709, been confirmed by several people in slack. Makes it impossible to add new widget to an empty sidebar in the Customizer - once it's emptied it becomes inactive (hiding).
Attachments (1)
Change History (6)
#2
@
10 years ago
- Keywords has-patch added; needs-patch removed
- Owner changed from westonruter to ocean90
- Status changed from assigned to reviewing
The problem seems to be the SidebarSection.isContextuallyActive
override of Section.isContextuallyActive
, which was introduced in #30235, specifically via commit c91db4d. This method override actually was taking things too far. Now that that SidebarSection
's active state is getting sent from the Preview, we can just rely on it to show/hide the section. We don't want to hide a section if all of the widgets in a section are removed or if they are all inactive (e.g. hidden via Jetpack Widget Visibility). So the method override I added was just plain wrong, I believe.
In 30378.diff I remove this method override.
Here is a shortcut which can be pasted into the browser console to empty out all sidebars to trigger the bad behavior: